[crossfire] Armour restriction / girdle

Mark Wedel mwedel at sonic.net
Sun Jan 21 23:41:40 CST 2007


Alex Schultz wrote:

> The change that caused this, actually fixed a bug where no_armour was
> *completely* ignored when players equipped things, thus making gods
> banning amour pointless. My fix made players and monsters, under all
> conditions, treat no_armour and no_shield consistently. While I agree
> that it's too harsh for no_armour gods to block girdles, I'm somewhat
> concerned at how your change breaks consistency. IMHO the real fix to
> both issues at once would be a flag to allow banning of equipping
> specific object type/subtype combinations, which would be much more
> flexible and allow consistency while not being unfair for no_armour gods.

  IMO, the armor subtypes (girdle, cloak, boots, shield, helmet) should just go 
away.

  They are left over from before the body code was added - back in the day, the 
type of the object determined where it was equipped, and limited the 
player/monster to just one of each type, save for rings, which were coded for two.

  The no armor/no shield had pretty easy checks against this.  However, the 
control on that, as seen now, isn't very specific.  IIRC, some of the races had 
no armor in part as balance, but part of it was also a reasoning that a suit of 
chain armor wouldn't fit on a dragon, etc.  However, that all or nothing then 
doesn't explain things like cloaks as well (if you have a neck, you could do a 
cloak, etc).

  So that's the history lesson.  On to current times:

  In the present code, the actual equip logic doesn't care what the object type 
is, as long as the player has the necessary body slot.  So I could make a custom 
object, give it the ring type, and set it up to go on the body instead of the 
finger, and this would work even if the character is denied armor use by his god.

  Now good arguments could be made on both sides of if this should be allowed or 
not.  However, whatever side is chosen as correct, it does tend to illustrate 
the point that the actual type of the object isn't particular relevant.  This 
list of what is or is not armor as far as the 'can use armor' flag is somewhat 
arbitrary, and still may not prevent armor like items from being used.

  So what would probably be clearest is that all the current armor subtypes 
(including probably rings) should be collapsed into 1 type, with perhaps 3 subtypes:

1 - shield
2 - armor like device, as far as equipping is concerned
3 - other - no restriction to equipping

  then, down the road, if changes are needed, it is simple archetype updates. 
IT also means that if new flags are added (can't use metal armor), it simple 
matter of updating the archetypes with a few lines of code is all that is needed 
- in the current methodology, you couldn't do a no metal armor, because there is 
no way to differentiate that type (but as I type this, it may be better to do 
the subtype as flags, with 0 being no restrictions, and the other bits being 
specific restrictions. Then, adding further granularity or restrictions would be 
easier - following some game examples, one could add heavy/medium/light armor 
types, or the no metal, etc).




More information about the crossfire mailing list