metastone icon indicating copy to clipboard operation
metastone copied to clipboard

Is there any way to code this?

Open Muhframos opened this issue 8 years ago • 10 comments

image

I have been having some trouble coding stuff like this. Is it possible to have something like a end of turn effect to target the same thing as the Battlecry targetted? I changed the wording on it a bit on the code just to make clearer what it does.

Current Code:

{
	"name": "Scary Longlegs",
	"baseManaCost": 3,
	"type": "MINION",
	"baseAttack": 2,
	"baseHp": 2,
	"heroClass": "HUNTER",
	"rarity": "RARE",
	"race": "BEAST",
	"description": "Poisonous. Battlecry: Freeze a minion, at the end of your turn, Freeze it again.",
	"battlecry": {
		"targetSelection": "MINIONS",
		"spell": {
			"class": "AddAttributeSpell",
			"attribute": "FROZEN"
		}
	},
	"triggers": [
		{
		"eventTrigger": {
			"class": "DamageCausedTrigger",
			"targetEntityType": "MINION",
			"hostTargetType": "IGNORE_OTHER_SOURCES"
		},
		"spell": {
			"class": "DestroySpell",
			"target": "EVENT_TARGET"
		}
		},
		{
		"eventTrigger": {
			"class": "TurnEndTrigger",
			"targetPlayer": "SELF"
		},
		"spell": {
			"class": "AddAttributeSpell",
			"target": "EVENT_TARGET",
			"attribute": "FROZEN"
		}
		}
	],
	"attributes": {
	"BATTLECRY": true
	},
	"collectible": true,
	"set": "CLASSIC",
	"fileFormatVersion": 1
}

Muhframos avatar May 18 '17 23:05 Muhframos

You would need to code it as an AddSpellTrigger spell attached to the frozen minion. I think it's possible though.

webadict avatar May 18 '17 23:05 webadict

you mean like Corruption? I dont think that would work... hmmm Is there anything that would be able to like, remove the trigger when it dies?

Muhframos avatar May 18 '17 23:05 Muhframos

It could, but you might be better off with the CANNOT_ATTACK attribute instead. Tying it to the entity ID is the hardest part.

webadict avatar May 19 '17 04:05 webadict

Cant i add like, a condition to the trigger, to check if the Scary Longlegs is still on board, to then freeze itself?

Muhframos avatar May 19 '17 15:05 Muhframos

That could work, but I'd be careful with Freeze. Freeze is a specific keyword for not allowing a minion to attack the next time it could. There may be edge cases that would allow you to attack with this minion, so I'd be careful.

If you do Cannot Attack instead, it would definitely not attack. Plus, it's more consistent with the keyword.

webadict avatar May 19 '17 15:05 webadict

hmmm if i make it to freeze itself at the start and end of every turn, would that still happen? 🤔

Muhframos avatar May 19 '17 15:05 Muhframos

It would probably not, but I never like taking chances.

webadict avatar May 19 '17 20:05 webadict

how much work would it be to add an attribute that's just used to label an enemy minion so that you can go:

{ "name": "Scary Longlegs", "baseManaCost": 3, "type": "MINION", "baseAttack": 2, "baseHp": 2, "heroClass": "HUNTER", "rarity": "RARE", "race": "BEAST", "description": "Poisonous. Battlecry: Choose a minion, it is Frozen while this minion is alive.", "battlecry":{ "targetSelection": "ALL_MINONS", "spell": { "class": "AddAttributeSpell", "attribute": "ADDED_ATTRIBUTE" } }, "aura": { "class": "AttributeAura", "target": "ALL_MINIONS", "attribute": "FROZEN", "filter": { "class": "AttributeFilter", "attribute": "ADDED_ATTRIBUTE" } }, "trigger": { "eventTrigger": { "class": "DamageCausedTrigger", "targetEntityType": "MINION", "hostTargetType": "IGNORE_OTHER_SOURCES" }, "spell": { "class": "DestroySpell", "target": "EVENT_TARGET" } }, "attributes": { "BATTLECRY": true, "ADDED_ATTRIBUTE":true
} }

Would it have to be similar to CTHUN_ATTACK_BUFF where the number of Scary Longlegs whose Battlecry has went off is kept track of?

DominusMaximus avatar May 19 '17 21:05 DominusMaximus

If you had multiple of those minions, they'd super conflict.

webadict avatar May 21 '17 03:05 webadict

Since ADDED_ATTRIBUTE would be updated everytime a Scary Longlegs Battlecry went off, the next one would always get a unique attribute, right?

DominusMaximus avatar May 21 '17 04:05 DominusMaximus