It is currently 06 Sep 2025, 21:23
   
Text Size

Spellskite added - please test

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Spellskite added - please test

Postby Max mtg » 21 Jun 2013, 04:22

Spellskite resulted pretty much hardcoded. There are some spots that can be replaced with expressions (like redirection target) - I don't know wheter to impletent it or leave as since for Spellskite being one of a kind.


Looking also for test scenarios: the simple ones, like Shock or Arc Trail, succeeded. What kind of complex interactions should be tested?

PS: Sloth, please give AI some instructions on how to use the named card.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Spellskite added - please test

Postby swordshine » 21 Jun 2013, 06:08

My opinions: 1) Muck Drubb is another card that can change the target to itself, so it's better not to use a param named "Spellskite".
2) I made a quick fix of the script, r22175.
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Spellskite added - please test

Postby swordshine » 21 Jun 2013, 06:22

Oops, I forgot that targeting an ability should use "Activated,Triggered". Fixed in 22177.
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Spellskite added - please test

Postby Max mtg » 21 Jun 2013, 06:33

Ah, Ok!
Just made a few fixes to Spellskite script to make it less specific.

So, is Muck Drubb also scriptable now?
- Looks like it's not. They say, Muck Drubb would change all 3 targets of Seeds of Strength (if all 3 pointed at the same creature) at once - it's like "replace all matches", while Spellskite's ability should be activated separatelly to change each target. Am I correct here?
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Spellskite added - please test

Postby friarsol » 21 Jun 2013, 12:45

Max mtg wrote:So, is Muck Drubb also scriptable now?
- Looks like it's not. They say, Muck Drubb would change all 3 targets of Seeds of Strength (if all 3 pointed at the same creature) at once - it's like "replace all matches", while Spellskite's ability should be activated separatelly to change each target. Am I correct here?
Reads right to me. I think the difference is that Muck Drubb needs to keep only one Target for the Spell, so if you changed only a single Target on Seeds of Strength then the spell would have multiple targets after it's trigger resolved.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Spellskite added - please test

Postby Max mtg » 21 Jun 2013, 13:01

* Seeds of Strength has 3 targets right from beginning. You may point all to the same creature however.
Pay attention to 3rd note here - http://magiccards.info/pc/en/76.html

Muck Drubb can be implemented like this:
1. Point at a target of a spell (same as for Spellskite)
2. for root and all subAbilities: replace all ocurrences of chosen target with Muck Drubb
That is: try remove chosen target, if not found (remove returned false) go to next subability, if found check canTarget - if ok add Muck Drubb and go to next subability, else rollback all target changes.

Implemented with Java code of course.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 68 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 68 users online :: 0 registered, 0 hidden and 68 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 68 guests

Login Form