Changes between Initial Version and Version 1 of NewEffects

11/22/11 11:44:21 (9 years ago)

First draft


  • NewEffects

    v1 v1  
     1= Rewriting effects = 
     2== The drivers == 
     3- refactoring (, #1041, #1124, #1403) 
     5- improve message handling (#1376, #1502) 
     7- bugfixing (#623, #726, #859, #1573, #1578) 
     9- increased flexibility and configurability (#57, #234, #418, #488, #578, #692, #992, #1276, #1279, #1408, #1437, #1459) 
     11== What we have now == 
     12Triggers leading to effects: 
     13- item use (quaff, read, aim, zap, use, eat, activate) 
     14- casting spell (includes all ranged monster attacks) 
     15- on-hit effects (monster confusion and monster blow effects) 
     16- on-move effects (triggering trap) 
     17- on-expiry effects (SHROOM_SPRINTING) 
     19Potential targets of effects: 
     20- player 
     21- monster(s) 
     22- object(s) 
     23- grid(s) 
     25Parameters potentially affecting effects: 
     26- originator level 
     27- target level 
     28- dungeon level 
     29- object level 
     30- spell level 
     31- feature level (trap / door / lock) 
     32- relevant skill (devices, mainly) 
     34Variables potentially affected: 
     35- amount (e.g. of damage, or healing) 
     36- range 
     37- duration 
     38- saving throw 
     39- random outcomes (polymorph, wonder etc.) 
     41At the moment only certain parameters affect certain variables for certain effects. 
     43At the moment certain amount variables are conflated with durations (cut, stun, poison).  
     45Most area affects are handled by the project() code, but separate functions exist for: 
     46- earthquake and destruction 
     47- detections 
     48- mapping, lighting and disarming 
     49- aggravation, probing, banishment and mass banishment 
     51Obviousness / learning is handled by various mechanisms. 
     53There are no effects which are conditional on the outcome of a previous effect, I think. 
     55== The vision == 
     56Most list-*.h files turned into !lib/edit files: 
     58list-effects.h and list-blow-effects.h and list-spell-effects.h combine into effects.txt 
     60list-gf-types.h becomes projections.txt 
     62list-mon-spells.h becomes mon_spell.txt (and eventually list-blow-methods.h into mon_blow.txt) 
     64It is not necessary to make a fully generic system. Something which replicates the current effects using editable text files would be a fine start. 
     66== Progress == 
     67=== Thinking === 
     68Effects should be atomic, with monster attacks, player spells or item activations specifying as many as they need.  
     70As much as possible should be adjusted before the effect is called, e.g. range and damage. These are properties of the item, spell or trap, not of the effect. 
     72All area effects could be done with project(). It's quite possible that all non-area effects could also be delivered via project(), if this is helpful. But this will mean passing variables into project (amount, duration, saving throw) because different targets may need those amounts adjusted differently. 
     74Current mental block is which adjustments which need to be passed into the effect(s) and how to manage them. 
     76=== Files === 
     77effects.txt - started 
     79mon_spell.txt - format and syntax done, just needs populating and parsing. At the moment the distinction between projected and non-projected spells is retained, but I think it may not be necessary, since project() can deal perfectly well with delivering an effect directly to a single target. 
     81projections.txt - half done (the breath elements), just needs the map effects sorting