[crossfire] A few random ideas

Nicolas Weeger nicolas.weeger at laposte.net
Fri Apr 15 15:55:30 CDT 2005


>
     
      * items combination / use item with item
     
     >
     
      Example one, use apple on knife => sliced apple.
     
     >
     
      Example two, use sliced apple with base pie crust => ready to cook apple pie. Then put it in oven (alchemy-like), except if you fail you just get a burnt pie, no exploding oven!
     
     
Ok, just committed code to do just that.
New item type, ITEM_TRANSFORMER (163). Just a special item, that when 
applied grabs the marked item. 'slaying' field is checked to transform 
if eligible.

See doc/Developers/item_transformation for explanations.

Crash example:
* create a 'knife' archetype, with type 163
* create 'half_apple' archetype
* add to apple archetype:
   slaying knife:2 half_apple

Now mark the apple, apply knife, you got 2 nice half-apples :)

As a special case, if transformer's level is non-zero, it gets used 
when transforming. Example case: apply bowl on water => bowl full of 
water, don't have anymore bottle or empty bowl.

I tested some, so I think code is all right. The use of 'slaying' is 
discutable, of course :)

And I tweaked the item description function to not print the slaying 
field for food :)

Nicolas

    
    


More information about the crossfire mailing list