Spellskite added - please test
Post MTG Forge Related Programming Questions Here
	Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
			6 posts
			 • Page 1 of 1
		
	
Spellskite added - please test
 by Max mtg » 21 Jun 2013, 04:22
by 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.
			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
 by swordshine » 21 Jun 2013, 06:08
by 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.
			
		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
 by swordshine » 21 Jun 2013, 06:22
by 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
 by Max mtg » 21 Jun 2013, 06:33
by 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?
			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
 by friarsol » 21 Jun 2013, 12:45
by friarsol » 21 Jun 2013, 12:45 
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.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?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Spellskite added - please test
 by Max mtg » 21 Jun 2013, 13:01
by 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.
			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
			6 posts
			 • Page 1 of 1
		
	
Who is online
Users browsing this forum: No registered users and 16 guests
