It is currently 07 Jul 2021, 11:58
   
Text Size

Shandalar - Program Bugs

Fork (fix completed)

 

AI cast Cruel Eddict and copied it with Fork everything resolved and I sacrificed 2 creature for those correctly but either the original or a copy of Cruel Eddict remained on the battlefield.
When I forked Lightning bolt everything worked fine.
Attachments
2015-06-04_181501.jpg
Last edited by Aswan jaguar on 04 Jun 2015, 16:12, edited 1 time in total.

Comments

Posted by Korath » 04 Jun 2015, 17:49

Happens with all of my nonpermanent spells.

Rather than, as in Manalink, individually making each spell remove itself from the battlefield when it's done resolving, I've made the engine do it if the card hasn't already moved itself somewhere else (as happens, for example, with Beacon of Immortality).

The problem is that the forked copy doesn't ever reach the battlefield like normally-cast spells - put_into_play() (which is what Fork uses to cast the copied spell) leaves STATE_INVISIBLE (which usually means the spell is still on the stack and hasn't begun to resolve) in place. A couple cards in Manalink exploit that to tell whether a card was cast normally, so it couldn't ever be fixed directly there; but I'll do so here.

(I note that Fork still has other problems; it has trouble keeping the copy red - not wholly unexpected - and it doesn't flag the copy as a token, so things like Beacon of Immortality and Time Spiral and so on that don't go to graveyard on resolution will put extra copies of themselves in your library/exile/etc. But those'll have to wait until a full rewrite.)

Posted by Korath » 04 Jun 2015, 17:53

commit 3eb0b130be023513b606d6595547046179d15b96
Author: Korath <dgk@Dirge.none>
Date: Thu Jun 4 13:52:15 2015 -0400

[Shandalar] FIX #600: put_into_play(): rm STATE_INVISIBLE before RESOLVE_SPELL

Ticket details

  • Ticket ID: 600
  • Project: Shandalar
  • Status: Fix completed
  • Component: Individual Card
  • Project version: Ruined Tower 2
  • Priority: Normal
  • Severity: Normal
  • Assigned to: Korath
  • Reported by: Aswan jaguar
  • Reporter's tickets: List all tickets
  • Reported on: 04 Jun 2015, 16:12
  • Last visited by Korath » 04 Aug 2015, 09:30.
 

Login Form