This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: A more sophisticated demonstration of change-type


On Sat, 2004-05-29 at 10:14, Eric McDonald wrote:
> It turns out that the 'acp-to-attack' problem you were seeing is related
> to this. The 'atk1', 'atk2', etc. are also lists of lists; i.e., 'atk1'
> expands to:
>   ((knight-1) (knight-2) ... (knight-6))
> instead of:
>   (knight-1 knight-2 ... knight-6)
> Placing an 'append' in the definition solves the problem:
>   (define atk1 (append l1 l2 l3 l4 l5 l6))

That did seem to work initially, but I've been elaborating on the game,
and seem to have run into an even more complex problem.  Consider the
following (admittedly *really* long) snippet of code from the new
version:

(unit-type blue-wyrmling
  (hp-max 30) (cp 14))
  
(unit-type very-young-blue-dragon
  (hp-max 40) (cp 16))
  
(unit-type young-blue-dragon
  (hp-max 60) (cp 20))
  
(unit-type juvenile-blue-dragon
  (hp-max 80) (cp 24))
  
(unit-type young-adult-blue-dragon
  (hp-max 110) (cp 30))
  
(unit-type adult-blue-dragon
  (hp-max 140) (cp 36))
  
(unit-type mature-adult-blue-dragon
  (hp-max 160) (cp 40))
  
(unit-type old-blue-dragon
  (hp-max 180) (cp 44))
  
(unit-type very-old-blue-dragon
  (hp-max 190) (cp 46))
  
(unit-type ancient-blue-dragon
  (hp-max 210) (cp 50))
  
(unit-type blue-wyrm
  (hp-max 230) (cp 54))
  
(unit-type great-blue-wyrm
  (hp-max 250) (cp 58))
  
(define blue-dragons (append blue-wyrmling very-young-blue-dragon young-blue-dragon juvenile-blue-dragon young-adult-blue-dragon adult-blue-dragon mature-adult-blue-dragon old-blue-dragon very-old-blue-dragon ancient-blue-dragon blue-wyrm great-blue-wyrm))

(add blue-dragons image-name "monsters-blue-dragon")
(add blue-dragons help "Vain, territorial dragon")

(unit-type copper-wyrmling
  (hp-max 30) (cp 14))
  
(unit-type very-young-copper-dragon
  (hp-max 50) (cp 18))
  
(unit-type young-copper-dragon
  (hp-max 70) (cp 22))
  
(unit-type juvenile-copper-dragon
  (hp-max 90) (cp 26))
  
(unit-type young-adult-copper-dragon
  (hp-max 110) (cp 30))
  
(unit-type adult-copper-dragon
  (hp-max 140) (cp 36))
  
(unit-type mature-adult-copper-dragon
  (hp-max 160) (cp 40))
  
(unit-type old-copper-dragon
  (hp-max 190) (cp 46))
  
(unit-type very-old-copper-dragon
  (hp-max 200) (cp 48))
  
(unit-type ancient-copper-dragon
  (hp-max 220) (cp 52))
  
(unit-type copper-wyrm
  (hp-max 230) (cp 54))
  
(unit-type great-copper-wyrm
  (hp-max 250) (cp 58))
  
(define copper-dragons (append copper-wyrmling very-young-copper-dragon young-copper-dragon juvenile-copper-dragon young-adult-copper-dragon adult-copper-dragon mature-adult-copper-dragon old-copper-dragon very-old-copper-dragon ancient-copper-dragon copper-wyrm great-copper-wyrm))

(add copper-dragons image-name "monsters-green-dragon")
(add copper-dragons help "Witty, prankster dragon")

(unit-type gold-wyrmling
  (hp-max 50) (cp 18))
  
(unit-type very-young-gold-dragon
  (hp-max 70) (cp 22))
  
(unit-type young-gold-dragon
  (hp-max 90) (cp 26))
  
(unit-type juvenile-gold-dragon
  (hp-max 110) (cp 30))
  
(unit-type young-adult-gold-dragon
  (hp-max 140) (cp 36))
  
(unit-type adult-gold-dragon
  (hp-max 160) (cp 40))
  
(unit-type mature-adult-gold-dragon
  (hp-max 190) (cp 46))
  
(unit-type old-gold-dragon
  (hp-max 210) (cp 50))
  
(unit-type very-old-gold-dragon
  (hp-max 220) (cp 52))
  
(unit-type ancient-gold-dragon
  (hp-max 240) (cp 56))
  
(unit-type gold-wyrm
  (hp-max 250) (cp 58))
  
(unit-type great-gold-wyrm
  (hp-max 270) (cp 62))
  
(define gold-dragons (append gold-wyrmling very-young-gold-dragon young-gold-dragon juvenile-gold-dragon young-adult-gold-dragon adult-gold-dragon mature-adult-gold-dragon old-gold-dragon very-old-gold-dragon ancient-gold-dragon gold-wyrm great-gold-wyrm))

(add gold-dragons image-name "monsters-pterodactyl")
(add gold-dragons help "Graceful, wise dragon")

(unit-type red-wyrmling
  (hp-max 40) (cp 16))
  
(unit-type very-young-red-dragon
  (hp-max 50) (cp 18))
  
(unit-type young-red-dragon
  (hp-max 70) (cp 22))
  
(unit-type juvenile-red-dragon
  (hp-max 100) (cp 28))
  
(unit-type young-adult-red-dragon
  (hp-max 130) (cp 34))
  
(unit-type adult-red-dragon
  (hp-max 150) (cp 38))
  
(unit-type mature-adult-red-dragon
  (hp-max 180) (cp 44))
  
(unit-type old-red-dragon
  (hp-max 200) (cp 48))
  
(unit-type very-old-red-dragon
  (hp-max 210) (cp 50))
  
(unit-type ancient-red-dragon
  (hp-max 230) (cp 54))
  
(unit-type red-wyrm
  (hp-max 240) (cp 56))
  
(unit-type great-red-wyrm
  (hp-max 260) (cp 60))
  
(define red-dragons (append red-wyrmling very-young-red-dragon young-red-dragon juvenile-red-dragon young-adult-red-dragon adult-red-dragon mature-adult-red-dragon old-red-dragon very-old-red-dragon ancient-red-dragon red-wyrm great-red-wyrm))

(add red-dragons image-name "red-dragon")
(add red-dragons notes "Covetous, greedy dragon")

; Dragon-kin

(unit-type dragon-turtle (image-name "beetle")
  (hp-max 90) (cp 26)
  (help "Aquatic dragon"))

(unit-type wyvern (image-name "monsters-small-dragon")
  (hp-max 60) (cp 20)
  (help "More primitive dragon-kin"))
  
(define true-dragons (append blue-dragons))
(define true-dragons (append copper-dragons))
(define true-dragons (append gold-dragons))
(define true-dragons (append red-dragons))

(define wyrmlings (blue-wyrmling copper-wyrmling gold-wyrmling red-wyrmling))
(define very-young-dragons (very-young-blue-dragon very-young-copper-dragon very-young-gold-dragon very-young-red-dragon))
(define young-dragons (young-blue-dragon young-copper-dragon young-gold-dragon young-red-dragon))
(define juvenile-dragons (juvenile-blue-dragon juvenile-copper-dragon juvenile-gold-dragon juvenile-red-dragon))
(define young-adult-dragons (young-adult-blue-dragon young-adult-copper-dragon young-adult-gold-dragon young-adult-red-dragon))
(define adult-dragons (adult-blue-dragon adult-copper-dragon adult-gold-dragon adult-red-dragon))
(define mature-adult-dragons (mature-adult-blue-dragon mature-adult-copper-dragon mature-adult-gold-dragon mature-adult-red-dragon))
(define old-dragons (old-blue-dragon old-copper-dragon old-gold-dragon old-red-dragon))
(define very-old-dragons (very-old-blue-dragon very-old-copper-dragon very-old-gold-dragon very-old-red-dragon))
(define ancient-dragons (ancient-blue-dragon ancient-copper-dragon ancient-gold-dragon ancient-red-dragon))
(define wyrms (blue-wyrm copper-wyrm gold-wyrm red-wyrm))
(define great-wyrms (great-blue-wyrm great-copper-wyrm great-gold-wyrm great-red-wyrm))

(define dragons (append true-dragons))
(define dragons (append dragon-turtle wyvern))


What I want to happen is that true-dragons becomes a list of all units
found in the lists blue-dragons, copper-dragosn, gold-dragons, and
red-dragons (i.e. all dragons except for the dragon-turtle and wyvern);
rather than a list containing the lists blue-dragons, copper-dragons,
gold-dragons, and red-dragons.  However, I get the following error when
Xconq parses those lines:

Warning: knights:482-523:
Symbol `true-dragons' has been bound already, overwriting

The error becomes compounded when I try to define "dragons" as including
"true-dragons", then I try to define "monsters" as including "dragons". 
The end result is that all dragon units are totally useless.

So what the heck am I doing wrong here?  I re-examined the "Language
Syntax" section of the manual, but I still don't quite see how this is
supposed to work.

> 
> Other notes:
>   I played the game for a while last night. I think it has a lot of
> potential, and I already found it to be rather enjoyable, in spite of
> its early stage of development. It seems that 'knight-1' units are
> becoming 'knight-2' units at about the right rate. However, I am not
> sure that 'knight-2' units are becoming 'knight-3' units fast enough. Of
> course, I didn't actually encounter the enemy, so I didn't have a chance
> to engage other 'knight-2' units, but laying siege to independent
> 'thorps' with gangs of knights was (a) fun, and (b) not rewarding enough
> in terms of advancement to ranks higher than 'knight-2'. Maybe the
> transition from 'thorp' to 'hamlet' could be accelerated so that the
> independent 'hamlets' would appear and produce opposing 'knight-2' units
> sooner. I think this would also make the game a little more entertaining
> in its early stages; people might feel more compelled to play if the
> earlier advances happen more rapidly before they become distracted by
> more fulfilling aspects of game play such as slaughter, carnage, and
> wrecking mayhem on an active opponent.

Wait until you see the rest of this new version!

---
Lincoln Peters
<sampln@sbcglobal.net>

Some scholars are like donkeys, they merely carry a lot of books.
		-- Folk saying


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]