Senior Member
Volunteer Data File Contributor
Join Date: Jan 2007
Posts: 591
|
How would I script this?
|
#1 |
Senior Member
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819
|
You could either do:
Code:
hero.tagis[Edge.edgTDNCO] + hero.tagis[Edge.edgTDOffic] <> 0 Or set up a variable to act as a counter, step through Edges just like you would when stepping through Knowledge skills, and check for the Edge type (I'm not sure of the syntax on that but I can try to find it tomorrow) and increment the variable by 1 each time it finds a Combat one. Then you just set a validif for the variable being > 1 and drop out of the foreach loop. Lenny Zimmermann Metairie, LA, USA Data files authored (please let me know if you see any issues with any of these if you have/use them): Official (In the downloader) 50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome Coming Eventually Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me) |
#2 |
Senior Member
Join Date: Nov 2009
Posts: 891
|
So, you mean how to make it be "Any 2 Combat Edges"? That would need to reference an eachpick where Edge is EdgeType.Combat.
Evil wins because good rolls poorly .... or the players are not paying enough attention to the game. |
#3 |
Senior Member
Join Date: Nov 2009
Posts: 891
|
OK, I got it if you mean "Any 2 Combat Edges"
Make a Pre-reqs Message is "Requires any 2 Combat Edges." Code:
var total as number total = 0 ~Make sure at least two Combat Edges exist. foreach pick in hero where "EdgeType.Combat" total += 1 nexteach ~if we have at least two valid edges, we're valid validif (total >= 2) ~if we got here, we're invalid if (@ispick <> 0) then altpick.linkvalid = 0 endif Evil wins because good rolls poorly .... or the players are not paying enough attention to the game. Last edited by SeeleyOne; September 1st, 2014 at 10:22 AM. Reason: Oops, I had left in commented-out code |
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2007
Posts: 591
|
Thanks.
|
#5 |
Senior Member
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819
|
I think you can simplify that a bit. Maybe something like:
Code:
var total as number total = 0 ~Make sure at least two Combat Edges exist. foreach pick in hero where "EdgeType.Combat" total += 1 if (total >= 2) validif (total >= 2) done endif nexteach ~if we got here, we're invalid if (@ispick <> 0) then altpick.linkvalid = 0 endif Lenny Zimmermann Metairie, LA, USA Data files authored (please let me know if you see any issues with any of these if you have/use them): Official (In the downloader) 50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome Coming Eventually Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me) |
#6 |
|
|