Page 72 of 85

Re: Card Contributions

PostPosted: 24 Jun 2013, 01:34
by swordshine
squee1968 wrote:
Kithkin Mourncaller | Open
Name:Kithkin Mourncaller
ManaCost:2 G
Types:Creature Kithkin Scout
PT:2/2
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature.Kithkin+attacking+YouOwn,Creature.Elf+attacking+YouOwn | Execute$ TrigDraw | OptionalDecider$ You | TriggerZones$ Battlefield | TriggerDescription$ Whenever an attacking Kithkin or Elf is put into your graveyard from the battlefield, you may draw a card.
SVar:TrigDraw:AB$ Draw | Cost$ 0 | Defined$ You | NumCards$ 1
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/kithkin_mourncaller.jpg


EDIT: Fixed, thank you, Sol.
Have you tested this card? The script looks good, but AFAIK, this card hasn't been scripted because LKI info in Forge doesn't contain combat information. So when a attacking Kithkin or Elf dies, it would never trigger.

Re: Card Contributions

PostPosted: 24 Jun 2013, 11:02
by Agetian
swordshine wrote:
squee1968 wrote:
Kithkin Mourncaller | Open
Name:Kithkin Mourncaller
ManaCost:2 G
Types:Creature Kithkin Scout
PT:2/2
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature.Kithkin+attacking+YouOwn,Creature.Elf+attacking+YouOwn | Execute$ TrigDraw | OptionalDecider$ You | TriggerZones$ Battlefield | TriggerDescription$ Whenever an attacking Kithkin or Elf is put into your graveyard from the battlefield, you may draw a card.
SVar:TrigDraw:AB$ Draw | Cost$ 0 | Defined$ You | NumCards$ 1
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/kithkin_mourncaller.jpg


EDIT: Fixed, thank you, Sol.
Have you tested this card? The script looks good, but AFAIK, this card hasn't been scripted because LKI info in Forge doesn't contain combat information. So when a attacking Kithkin or Elf dies, it would never trigger.
This is actually an issue with several cards that are already in the game despite the fact that they don't work correctly as far as post-mortem triggers go (such as Abu Ja'Far - it was marked as a known issue a while ago and has been an issue for almost a year by now, actually), too bad it's apparently difficult to fix - I tried to work on it about a month ago but didn't get anywhere with it. If anyone can actually get the game to remember the relevant combat info for triggers such as this one to actually fire, I'd much appreciate it. :)

- Agetian

Re: Card Contributions

PostPosted: 25 Jun 2013, 13:37
by Max mtg
Speaking of Combat LKI,
the only place where that sort of data has to be collected seems to be GameAction.changeZone method, line about 228, when the removed from combat creature leaves battlefield.

So the lki probably could be done by saving values related to that card in Combat instance. Every check related to isAttacking/Blocked etc should test firstly card.isInPlay() and if false, use LKI. The LKI itself could be stored as a map from card to CombatLastKnownInfo.
I am wondering what kind of data has to be stored in that structure, that is which fields the CombatLastKnownInfo class is going to have.

Re: Card Contributions

PostPosted: 25 Jun 2013, 13:48
by Agetian
Max mtg wrote:Speaking of Combat LKI,
.....
I am wondering what kind of data has to be stored in that structure, that is which fields the CombatLastKnownInfo class is going to have.
Hmm, I guess that the structure fields can be added incrementally as they are required by potential cards in the future, but I wonder if we actually need any fields at the moment for the current stuff (Wall of Shadows Wall of Corpses, Abu Ja'far, Kithkin Mourncaller) to work except the card type/subtype and maybe the card color (for Protection mechanics? Not sure if e.g. Abu Ja'far blocks a card and then the blocked card gains Protection from White via an instant the card would still be destroyed... I think so, but need confirmation). The subtype is useful for Kithkin Mourncaller as it's looking specifically for an attacking Kithkin or Elf. That'd be my guess.

- Agetian

Re: Card Contributions

PostPosted: 25 Jun 2013, 14:56
by Max mtg
Then it results in just a couple of fields. CombatLki is to contain a reference to AttackingBand and a boolean flag.

  • If the flag equals true, then the Band indicates attacking band this creature used to belong to (note, that empty bands must not be cleared from combat). Given the band, we can get the (remaining in play) creatures blocking it and the defender.
  • If the flag is false, the Band reference indicates the attackers blocked by that creature.
This will allow to test if a LKI cards was attacking (+get target), was blocking or blocked. This would also allow to get remaning in play combatants fighting the LKI one.

PS: Wall of Shadows target restrictions drive me crazy. Are they scriptable?

Re: Card Contributions

PostPosted: 25 Jun 2013, 15:15
by friarsol
Max mtg wrote:PS: Wall of Shadows target restrictions drive me crazy. Are they scriptable?
I don't believe we have an equivilant of hasProperty for Target.ValidTgts. I believe the function that checks this is SpellAbility.canTargetSpellAbility()

Re: Card Contributions

PostPosted: 25 Jun 2013, 15:18
by Agetian
Max mtg wrote:PS: Wall of Shadows target restrictions drive me crazy. Are they scriptable?
Oh, sorry, my bad - I meant Wall of Corpses, not Wall of Shadows...

- Agetian

Re: Card Contributions

PostPosted: 25 Jun 2013, 17:03
by Agetian
By the way, speaking of cards that could benefit from combat LKI - is anyone aware of what other cards are currently scripted or scriptable (in addition to the three mentioned above) that rely on combat LKI for resolution of effects? If anybody knows other cards like that, it might be important to provide that information so that it's possible to decide what information needs to be passed around in the CombatLki structure.

- Agetian

Re: Card Contributions

PostPosted: 25 Jun 2013, 17:24
by friarsol
Agetian wrote:By the way, speaking of cards that could benefit from combat LKI - is anyone aware of what other cards are currently scripted or scriptable (in addition to the three mentioned above) that rely on combat LKI for resolution of effects? If anybody knows other cards like that, it might be important to provide that information so that it's possible to decide what information needs to be passed around in the CombatLki structure.

- Agetian
Here are a few similar examples
Urborg Panther, Coils of the Medusa, Dauthi Jackal, War-Torch Goblin, Tinder Wall

Re: Card Contributions

PostPosted: 25 Jun 2013, 17:45
by Max mtg
None of these require combatLki.
The abilities using targets are targeted before payment is made - at that moment the creature is still alive and in combat.
Coils of the Medusa is destroyed but the creature it enchants remains in play, so no Lki needed again.

Re: Card Contributions

PostPosted: 25 Jun 2013, 18:01
by friarsol
Max mtg wrote:None of these require combatLki.
The abilities using targets are targeted before payment is made - at that moment the creature is still alive and in combat.
Coils of the Medusa is destroyed but the creature it enchants remains in play, so no Lki needed again.
Targeting is rechecked on ability resolution for fizzling. Since the card (like Urborg Panther) is in the graveyard and no longer actually blocked by whatever creature it was blocked by on activation, the ability fizzles, thus it needs LKI.

Edit: Direction of blocking

Re: Card Contributions

PostPosted: 25 Jun 2013, 20:28
by Max mtg
Ok, I've commited a couple of changes: 22287 and 22289.
My tests have shown that Kithkin Mourncaller and Abu Ja'far now work as intended.

Please see that yourselves and script the remaining cards.

Re: Card Contributions

PostPosted: 26 Jun 2013, 04:47
by Agetian
Max mtg wrote:Ok, I've commited a couple of changes: 22287 and 22289.
My tests have shown that Kithkin Mourncaller and Abu Ja'far now work as intended.

Please see that yourselves and script the remaining cards.
Seems to work great, Max, thanks! :) Do you have an idea why the "creature buried" sound effect doesn't fire when Abu Ja'far destroys the card? Should there be an extra notification about the event somewhere that would still notify the sound system if the LKI of the card is used when determining that the card should be buried?..

- Agetian

Re: Card Contributions

PostPosted: 26 Jun 2013, 23:48
by kevvo
This is my very first card, so apologies if it's wrong. Is anyone doing banding cards? I'd be happy to start back at Alpha and start adding banding cards if no one else is doing it. I'm not sure I'm ready to handle Battering Ram but if this card is right I can surely handle Timber Wolves and Benalish Hero. I did test in Forge and everything seems to work.

Code: Select all
Name:Soraya the Falconer
ManaCost:1 W W
Types:Legendary Creature Human
PT:2/2
S:Mode$ Continuous | Affected$ Creature.Bird | AddPower$ 1 | AddToughness$ 1 | Description$ Bird Creatures get +1/+1.
A:AB$ Pump | Cost$ 1 W | ValidTgts$ Creature.Bird | TgtPrompt$ Select target Bird creature | KW$ Banding | SpellDescription$ Target Bird creature gains banding until end of turn.

Re: Card Contributions

PostPosted: 27 Jun 2013, 02:08
by swordshine
kevvo wrote:This is my very first card, so apologies if it's wrong. Is anyone doing banding cards? I'd be happy to start back at Alpha and start adding banding cards if no one else is doing it. I'm not sure I'm ready to handle Battering Ram but if this card is right I can surely handle Timber Wolves and Benalish Hero. I did test in Forge and everything seems to work.

Code: Select all
Name:Soraya the Falconer
ManaCost:1 W W
Types:Legendary Creature Human
PT:2/2
S:Mode$ Continuous | Affected$ Creature.Bird | AddPower$ 1 | AddToughness$ 1 | Description$ Bird Creatures get +1/+1.
A:AB$ Pump | Cost$ 1 W | ValidTgts$ Creature.Bird | TgtPrompt$ Select target Bird creature | KW$ Banding | SpellDescription$ Target Bird creature gains banding until end of turn.
Thanks, kevvo. The card script is correct, but if you downloaded the latest snapshothttp://cardforge.org/releases/snapshots/forge/forge/, you'll find this card is already scripted. We have recently discussed the remaining cards here http://www.slightlymagic.net/forum/viewtopic.php?f=52&t=10868 and http://www.slightlymagic.net/forum/viewtopic.php?f=52&t=10432. Most of them are really difficult :mrgreen: . BTW, M14 spoiler season is coming, if you are interested in some of the cards, you have plenty of opportunities to script them. http://www.slightlymagic.net/forum/viewtopic.php?f=52&t=10360