How to code Planeswalkers ? (Non Working)

For all your questions regarding Image Card Coding.
Please read the Image Posting Guideline & Index before posting in this forum.
Forum rules
DO NOT POST BUG REPORT IN THIS FORUM !!

Please read carefully the forum rules related to the card coding section : viewtopic.php?f=21&t=1545

All post will be edited to follow forum rules.
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: How to code Planeswalkers ? (Non Working)

Post by Zethfox »

all tho this was a merge bump i will add incase anyone does read....every thing except "opponent chooses to attack you or planewalker during battle" can be coded on this type of card with some work and very little issues.
even the "when planewalker takes damage remove counters" can be done...but missing the choice to choose to directly attack the planes walker during combat phase" makes coding these very boarderline....remember its the opponent that chooses to attack it, not YOU choosing if it takes damage instead of you...which can be coded also....it is even possible to choose the planewalker for player targeted spells by listing its type as type=player ...you can even choose during combat begins that you will be attacking the opponents planewalker...BUT the supoorted part is ai will not know what to do when presented with a choice to attacking player or planewalker during its combat phase...
pake1
Posts: 129
Joined: Tue Mar 30, 2010 12:47 am

Re: How to code Planeswalkers ? (Non Working)

Post by pake1 »

What does the "remove counters when damaged" code look like? I've been trying to figure that part out for a while now
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: How to code Planeswalkers ? (Non Working)

Post by Zethfox »

ill get back to you on it...currently overloaded with cards im making.
Saiki
Posts: 156
Joined: Fri Jun 12, 2009 10:47 pm

Re: How to code Planeswalkers ? (Non Working)

Post by Saiki »

oops.. I was looking for a subject like this and didn't see it. brainfart I guess lol
Image
pake1
Posts: 129
Joined: Tue Mar 30, 2010 12:47 am

Re: How to code Planeswalkers ? (Non Working)

Post by pake1 »

Ok here's my version of Chandra Nalaar

This is taken from kaioshens code modified abit.


Image

Code: Select all

[card]
name=Chandra Nalaar
auto=@damaged(player) from(*|opponentbattlefield):may token(-51120)
auto=counter(0/1,6,Loyalty)
auto=counter(0/0,3,Choice)
auto=@movedto(chandra nalaar|battlefield):bury all(chandra nalaar)
auto=this(counter{0/1,1,Loyalty}<1) may bury
auto=@each my upkeep:counter(0/0,-3,Choice) && counter(0/0,3,Choice)
auto={C(0/0,-2,Choice)}{C(0/1,1,Loyalty)}:damage:1 target(player) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-1,Loyalty)}:token(-51121) && damage:1 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-2,Loyalty)}:token(-51122) && damage:2 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-3,Loyalty)}:token(-51123) && damage:3 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-4,Loyalty)}:token(-51124) && damage:4 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-5,Loyalty)}:token(-51125) && damage:5 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-6,Loyalty)}:token(-51126) && damage:6 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-7,Loyalty)}:token(-51127) && damage:7 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-8,Loyalty)}:token(-51128) && damage:8 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-9,Loyalty)}:token(-51129) && damage:9 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-10,Loyalty)}:token(-51130) && damage:10 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-11,Loyalty)}:token(-51131) && damage:11 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-8,Loyalty)}:damage:10 target(player) && damage:10 all(creature|opponentBattlefield)
text= +1: Chandra Nalaar deals 1 damage to target player. -X: Chandra Nalaar deals X damage to target creature. -8: Chandra Nalaar deals 10 
damage to target player and each creature he or she controls.
mana={3}{R}{R}
abilities=cantattack
abilities=shroud
type=Enchantment
subtype=Planeswalker Chandra
toughness=0
[/card]
[card]
name=Damaged =(
id=-51120
auto=may life:1 controller && counter(0/1,-1,Loyalty) all(chandra nalaar|mybattlefield) && token(-51120)
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=1
id=-51121
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=2
id=-51122
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=3
id=-51123
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=4
id=-51124
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=5
id=-51125
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=6
id=-51126
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=7
id=-51127
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=8
id=-51128
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=9
id=-51129
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=10
id=-51130
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=11
id=-51131
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Third Ability
id=-51132
type=nothing
auto=moveto(exile) all(this)
[/card]
Tokens for choosing options.

Ok heres parts that are changed:

1.Whenever you are attacked, a prompt will pop up called (Damaged). Select the ability and then select "Life". For each life you select, a Loyalty counter is reduced, and life is put back onto you. When there are no more loyalty counters, a prompt will appear to destory

2. Can't be two types of Plansewalkers on the field (two Chandra Nalaars are put into the graveyard)

3. Not an enchantment nor artifcact=p

AI doesn't cast it because it doesn't know how to use it...

One small, and annoying issue: The prompt to redistribute life between the player and the planewalker triggers when both player AND opponent is damaged.. if you can find a way around that, then you have a borderline planeswalker.
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: How to code Planeswalkers ? (Non Working)

Post by Zethfox »

pake1 wrote:Ok here's my version of Chandra Nalaar

This is taken from kaioshens code modified abit.


Image

Code: Select all

[card]
name=Chandra Nalaar
auto=@damaged(player) from(*|opponentbattlefield):may token(-51120)
auto=counter(0/1,6,Loyalty)
auto=counter(0/0,3,Choice)
auto=@movedto(chandra nalaar|battlefield):bury all(chandra nalaar)
auto=this(counter{0/1,1,Loyalty}<1) may bury
auto=@each my upkeep:counter(0/0,-3,Choice) && counter(0/0,3,Choice)
auto={C(0/0,-2,Choice)}{C(0/1,1,Loyalty)}:damage:1 target(player) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-1,Loyalty)}:token(-51121) && damage:1 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-2,Loyalty)}:token(-51122) && damage:2 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-3,Loyalty)}:token(-51123) && damage:3 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-4,Loyalty)}:token(-51124) && damage:4 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-5,Loyalty)}:token(-51125) && damage:5 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-6,Loyalty)}:token(-51126) && damage:6 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-7,Loyalty)}:token(-51127) && damage:7 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-8,Loyalty)}:token(-51128) && damage:8 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-9,Loyalty)}:token(-51129) && damage:9 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-10,Loyalty)}:token(-51130) && damage:10 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-11,Loyalty)}:token(-51131) && damage:11 target(creature) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-8,Loyalty)}:damage:10 target(player) && damage:10 all(creature|opponentBattlefield)
text= +1: Chandra Nalaar deals 1 damage to target player. -X: Chandra Nalaar deals X damage to target creature. -8: Chandra Nalaar deals 10 
damage to target player and each creature he or she controls.
mana={3}{R}{R}
abilities=cantattack
abilities=shroud
type=Enchantment
subtype=Planeswalker Chandra
toughness=0
[/card]
[card]
name=Damaged =(
id=-51120
auto=may life:1 controller && counter(0/1,-1,Loyalty) all(chandra nalaar|mybattlefield) && token(-51120)
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=1
id=-51121
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=2
id=-51122
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=3
id=-51123
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=4
id=-51124
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=5
id=-51125
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=6
id=-51126
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=7
id=-51127
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=8
id=-51128
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=9
id=-51129
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=10
id=-51130
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Damage:x=11
id=-51131
type=nothing
auto=moveto(exile) all(this)
[/card]
[card]
name=Third Ability
id=-51132
type=nothing
auto=moveto(exile) all(this)
[/card]
Tokens for choosing options.

Ok heres parts that are changed:

1.Whenever you are attacked, a prompt will pop up called (Damaged). Select the ability and then select "Life". For each life you select, a Loyalty counter is reduced, and life is put back onto you. When there are no more loyalty counters, a prompt will appear to destory

2. Can't be two types of Plansewalkers on the field (two Chandra Nalaars are put into the graveyard)

3. Not an enchantment nor artifcact=p

AI doesn't cast it because it doesn't know how to use it...

One small, and annoying issue: The prompt to redistribute life between the player and the planewalker triggers when both player AND opponent is damaged.. if you can find a way around that, then you have a borderline planeswalker.
you know that you can use type=player right?

and about the token option thing lol, i edited my current copy of wagic to remove the "create " keyword it uses in the tokencreator ability, so now it just list the options without saying "create"..i fiured theres no point in it telling me that its creating anything since it will aways either say the token name or "ability"

and about the Ai, i looked at the code and it seems like it cant do things that are too complex...
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: How to code Planeswalkers ? (Non Working)

Post by Zethfox »

oh and pike....you FREAKING ROCK BROTHER!!!! even if its boarder line its worth it just for the effects...PLEASE PLEASE do Jace next.
oh and if you want to have multiples here what you do...you know how to add new cards with custom images to a card dat right? well, you make a
Chandra Nalaar two
Chandra Nalaar three
Chandra Nalaar four

copy the image of her 3 times and assign and assign 2,3,4 to the new Chandra Nalaar two image, Chandra Nalaar three image, and Chandra Nalaar four image...

then when you build a deck, just make sure not to grab 2 of the same one by selecting her with card images turned off...
also dont forget to copy paste her code 3 more times and match it each up to an image also...only her main code and the damaged card needs to be copy pasted, the "title cards" can all be shared.
this workaround works for any card which you need to actually use named targetting. its a dirty workaround but hey man, unless someone feels like coding it the missing trigger checks so we dont need to do it like this...its our only hope of using cards that would normally work fine...i have 17 instences of coat of arms in my collection...i even editted the image to list the types that version of coat of arms is meant for.

and hey i would really like if you, Mox, and KF1 gave me a review on the future custom set ability spoiler i posted in the custom set section...i only spoiled the setting of my world, a few of the main capitals, and all the new abilities i will be using in it.
pake1
Posts: 129
Joined: Tue Mar 30, 2010 12:47 am

Re: How to code Planeswalkers ? (Non Working)

Post by pake1 »

Image

Code: Select all

[card]
name=Jace Beleren
auto=counter(0/1,3,Loyalty)
auto=counter(0/0,3,Choice)
auto=@movedto(jace beleren|battlefield):bury all(*[jace])
auto=this(counter{0/1,1,Loyalty}<1) may bury
auto=@damaged(player) from(*|opponentbattlefield):may token(-51134)
auto=@each cleanup:bury all(jace beleren[-counter{0/1.1.Loyalty}])
auto=@each combatends:bury all(jace beleren[-counter{0/1.1.Loyalty}])
auto=@each my upkeep:counter(0/0,-3,Choice) && counter(0/0,3,Choice)
auto={C(0/0,-2,Choice)}{C(0/1,2,Loyalty)}:draw:1 controller && draw:1 opponent asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-1,Loyalty)}:draw:1 target(player) asSorcery
auto={C(0/0,-2,Choice)}{C(0/1,-10,Loyalty)}:deplete:20 target(player) asSorcery
mana={1}{U}{U}
abilities=shroud
subtype=Planeswalker Jace 
toughness=0
[/card]
[card]
name=Damaged Jace
auto=may life:1 controller && counter(0/1,-1,Loyalty) all(jace beleren|mybattlefield) && token(-51134)
id=-51134
type=nothing
auto=moveto(exile) all(this)
[/card]
Heres Jace, I plan to release the planeswalkers as a different.txt,,

i use the
auto=@damaged(player) from(*|opponentbattlefield):may token(-51134)

so that you can distribute the damage between either the player or planes walker lol. very ghetto

and yeah i'll review it man.

props to kaio with the base code.
Locked