diff options
author | Robert Burnham <burnhamrobertp@gmail.com> | 2011-06-21 16:28:04 -0500 |
---|---|---|
committer | Robert Burnham <burnhamrobertp@gmail.com> | 2011-06-21 16:28:04 -0500 |
commit | 50d20b0118ed8a69466474473ca33a6fa202d8fe (patch) | |
tree | b51e7a452089afe9ce35ceae618b21f0ff31f7f4 /crawl-ref/source/attack.h | |
parent | 69dd873d037e456621586b713e40201d3df42968 (diff) | |
download | crawl-ref-50d20b0118ed8a69466474473ca33a6fa202d8fe.tar.gz crawl-ref-50d20b0118ed8a69466474473ca33a6fa202d8fe.zip |
mon_attack_flavour => attack_flavour
Replaces mon_attack_flavour with attack_flavour with the hopes that
at some point in the future we might be able to use it instead of
brands as a unified method of identifying a particular attacks'
flavour. Alternatively, it might find a niche in player attacks
that have flavour but are not actually brands (confusing touch).
In addition, this adds attk_type, attk_flavour, and attk_damage to
attack class. These variables have their value set (if the attacker
is of atype() ACT_MONSTER) to the apropriate values of the mon_attack
_def within melee_attack::melee_attack(..). This allows us to only
create one instance of mon_attack_def and thereafter are free to
reference the variables directly.
This commit should allow for me to continue to merge monster_attack
into the unified code line. This serves as a milestone, but presently
most of the functionality of monster combat (and part of player
combat as well) is certainly broken / non-existant (those code paths
have been isolated from the line of exection, pending being written
into the unified code).
Diffstat (limited to 'crawl-ref/source/attack.h')
-rw-r--r-- | crawl-ref/source/attack.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/attack.h b/crawl-ref/source/attack.h index ba8e3a33b3..714b59bcc9 100644 --- a/crawl-ref/source/attack.h +++ b/crawl-ref/source/attack.h @@ -3,6 +3,7 @@ #include "artefact.h" #include "itemprop-enum.h" +#include "mon-enum.h" // Used throughout inheriting classes, define them here for universal access const int HIT_WEAK = 7; @@ -42,11 +43,20 @@ public: bool unarmed_capable; int ev_margin; + // TODO: Expand the implementation of attack_type/attack_flavour to be used + // by players as well as monsters. It could be a good middle ground for + // brands and attack types (presently, players don't really have an attack + // type) + attack_type attk_type; + attack_flavour attk_flavour; + int attk_damage; + item_def *weapon; brand_type damage_brand; skill_type wpn_skill; hands_reqd_type hands; bool hand_half_bonus; + // Attacker's shield, stored so we can reference it and determine // the attacker's combat effectiveness (staff + shield == bad) item_def *shield; |