Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble with a custom spell #371

Open
Watermelon86 opened this issue Jul 27, 2017 · 2 comments
Open

Trouble with a custom spell #371

Watermelon86 opened this issue Jul 27, 2017 · 2 comments

Comments

@Watermelon86
Copy link

I've been working on implementing some custom cards that help make a control hunter archetype, but one of the spells is giving me issues.

image

I wanted it to work sort of like Stampede and Lock and Load as a trigger effect that lasts one turn, but instead of adding cards to your hand, it would turn your removal spells into mini board clears.

{
"name": "Scatter Shot",
"baseManaCost": 2,
"type": "SPELL",
"heroClass": "HUNTER",
"rarity": "EPIC",
"description": "Whenever you cast a spell on a minion this turn, cast a copy of it on adjacent minions as well.",
"targetSelection": "NONE",
"spell": {
"class": "AddSpellTriggerSpell",
"target": "FRIENDLY_PLAYER",
"trigger": {
"eventTrigger": {
"class": "SpellCastedTrigger",
"sourcePlayer": "SELF",
"targetEntityType": "MINION"
},
"spell": {
"class": "RecastSpell",
"target": "ADJACENT_MINIONS",
"card": "PENDING_CARD"
},
"oneTurn": true
}
},
"collectible": true,
"set": "CUSTOM",
"fileFormatVersion": 1
}

Whenever I try to cast a targeted spell on a minion the turn I play this, the entire game crashes.
I think the issue is that it's trying to cast copies of the copied spells in a never ending loop.

Any ideas on how to fix this are appreciated.

@percy896
Copy link

percy896 commented Jul 28, 2017

Not sure if this is the issue, but shouldn't you use "metaspell" for multiple spells in one card?

@guyde2011
Copy link

guyde2011 commented Jul 29, 2017

You could use a dummy modifier (my favorite is MANA_COST_MODIFIER, as it does not affect anything, it resets when a minion returns to your hand).

That allows you to use a workaround like this:

"class": "ConditionalEffectSpell",
"spell1": {
	"class": "NullSpell"
},
"spell2": {
	"class": "MetaSpell",
	"spells": [
	{
		"class": "ModifyAttributeSpell",
		"target": "ADJACENT_MINIONS",
		"attribute": "MANA_COST_MODIFIER",
		"value": 100
	},
	{
		"class": "RecastSpell",
		"target": "ADJACENT_MINIONS",
		"card": "PENDING_CARD"
	},
	{
		"class": "ModifyAttributeSpell",
		"target": "ADJACENT_MINIONS",
		"attribute": "MANA_COST_MODIFIER",
		"value": 0
	}
	]
},
"condition": {
	"class": "AttributeCondition",
	"target": "SELF",
	"operation": "EQUAL",
	"attribute": "MANA_COST_MODIFIER",
	"value": 0
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants