Permalink
Browse files

working on stuff

  • Loading branch information...
1 parent 5d99da8 commit dafb84e852ab2da07c492dafc7c4052ba716b941 @fluffymormegil fluffymormegil committed Nov 26, 2009
Showing with 13 additions and 4 deletions.
  1. +6 −1 README
  2. +4 −0 src/player.hh
  3. +3 −3 src/u.cc
View
@@ -1,4 +1,9 @@
-Top-level directory structure:
+Advice to would-be committers
+=============================
+1) This is a BSD-licensed project.
+
+Top-level directory structure
+=============================
audio/
does not exist yet; will eventually contain Csound scores and orchestras
View
@@ -65,6 +65,10 @@ struct Player {
Obj_handle ring; /* For now, you can only wear one magic ring. */
bool farmoving;
libmrl::Coord farmove_direction;
+ // Persistent effect handling
+ std::list<Perseff_data> perseffs;
+ Status_flags status;
+ // computed-value functions
int net_body() const { return body - bdam; }
int net_agility() const { return agility - adam; }
};
View
@@ -51,14 +51,14 @@ void recalc_defence(void)
{
u.resistances[i] &= RESIST_MASK_TEMPORARY;
}
- u.speed = (u.leadfoot ? SPEED_SLOW : SPEED_NORMAL);
- int defshift = !!u.leadfoot + !!u.withering;
+ u.speed = (u.status.test_flag(Malus_withered)) ? SPEED_SLOW : SPEED_NORMAL;
+ int defshift = !!u.status.test_flag(Malus_leadfooted) + !!u.status.test_flag(Malus_withered);
u.defence = u.net_agility() / 5;
u.defence >>= defshift;
u.evasion = u.net_agility();
if (armptr)
{
- u.defence += u.armourmelt ? 0 : permobjs[armptr->obj_id].power;
+ u.defence += u.status.test_flag(Malus_armourmelted) ? 0 : permobjs[armptr->obj_id].power;
u.evasion *= EVASION_PRESCALE - evasion_penalty(u.armour);
switch (armptr->obj_id)
{

0 comments on commit dafb84e

Please sign in to comment.