metastone
metastone copied to clipboard
Is there any way to code this?

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
}
You would need to code it as an AddSpellTrigger spell attached to the frozen minion. I think it's possible though.
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?
It could, but you might be better off with the CANNOT_ATTACK attribute instead. Tying it to the entity ID is the hardest part.
Cant i add like, a condition to the trigger, to check if the Scary Longlegs is still on board, to then freeze itself?
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.
hmmm if i make it to freeze itself at the start and end of every turn, would that still happen? 🤔
It would probably not, but I never like taking chances.
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?
If you had multiple of those minions, they'd super conflict.
Since ADDED_ATTRIBUTE would be updated everytime a Scary Longlegs Battlecry went off, the next one would always get a unique attribute, right?