Need pieces to change on undefended s... Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Designing Games for Zillions » Need pieces to change on undefended squares « Previous Next »

Author Message
dhalgren (Dhalgren)
Posted on Sunday, April 30, 2006 - 6:32 pm:   

I'm having trouble writing a ZRF for a game that I'd like to test. I need pieces to change types when landing on square that will be undefended. But using not-defended? doesn't work because the square is defended by the piece that wants to move there. So, is there an easy way to do this?
L. Lynn Smith (Interrupt27)
Posted on Sunday, April 30, 2006 - 9:43 pm:   

Here's goes a round-about way:

Have each player a specific dummy piece which sits on a dummy position.

Give every piece on the field an attribute which will be toggled on when it changes type. This attribute should be toggled off when the pieces move.

Have the dummy piece check every positon on the field for an enemy piece which sits on a last-to? position, has its attribute toggled on and is defended, then this dummy piece captures the opposing dummy piece. Set the capture of this dummy piece as a checkmated loss-condition.

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: