Mercurial > mm7
comparison mm7_6.cpp @ 1974:0f62a2b8bd0a
stru319::_4273BB moved to Actor::_4273BB, renamed to _4273BB_DoesHitOtherActor
author | Grumpy7 |
---|---|
date | Sat, 26 Oct 2013 00:41:13 -0700 |
parents | f708aaeb635b |
children | c1c74df0a33e |
comparison
equal
deleted
inserted
replaced
1973:f708aaeb635b | 1974:0f62a2b8bd0a |
---|---|
101 if ( v12 ^ v13 ) | 101 if ( v12 ^ v13 ) |
102 result = 0; | 102 result = 0; |
103 else | 103 else |
104 result = 1; | 104 result = 1; |
105 return result; | 105 return result; |
106 } | |
107 | |
108 //----- (004273BB) -------------------------------------------------------- | |
109 bool stru319::_4273BB(Actor *attacker, Actor *defender, int a3, int a4) | |
110 { | |
111 signed int v6; // ebx@1 | |
112 signed int v7; // esi@1 | |
113 int armorSum; // ebx@10 | |
114 signed int a2a; // [sp+18h] [bp+Ch]@1 | |
115 | |
116 v6 = defender->pMonsterInfo.uAC; | |
117 v7 = 0; | |
118 a2a = 0; | |
119 if ( defender->pActorBuffs[ACTOR_BUFF_SOMETHING_THAT_HALVES_AC].uExpireTime > 0 ) | |
120 v6 /= 2; | |
121 if ( defender->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].uExpireTime > 0 ) | |
122 v7 = defender->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].uPower; | |
123 if ( defender->pActorBuffs[ACTOR_BUFF_STONESKIN].uExpireTime > 0 && defender->pActorBuffs[ACTOR_BUFF_STONESKIN].uPower > v7 ) | |
124 v7 = defender->pActorBuffs[ACTOR_BUFF_STONESKIN].uPower; | |
125 armorSum = v7 + v6; | |
126 if ( attacker->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].uExpireTime > 0 ) | |
127 a2a = attacker->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].uPower; | |
128 if ( attacker->pActorBuffs[ACTOR_BUFF_BLESS].uExpireTime > 0 && attacker->pActorBuffs[ACTOR_BUFF_BLESS].uPower > a2a ) | |
129 a2a = attacker->pActorBuffs[ACTOR_BUFF_BLESS].uPower; | |
130 if ( attacker->pActorBuffs[ACTOR_BUFF_FATE].uExpireTime > 0 ) | |
131 { | |
132 a2a += attacker->pActorBuffs[ACTOR_BUFF_FATE].uPower; | |
133 attacker->pActorBuffs[ACTOR_BUFF_FATE].Reset(); | |
134 } | |
135 return rand() % (armorSum + 2 * attacker->pMonsterInfo.uLevel + 10) + a2a + 1 > armorSum + 5; | |
136 } | 106 } |
137 | 107 |
138 //----- (004274AD) -------------------------------------------------------- | 108 //----- (004274AD) -------------------------------------------------------- |
139 bool stru319::ActorHitOrMiss(Actor *pActor, Player *pPlayer) | 109 bool stru319::ActorHitOrMiss(Actor *pActor, Player *pPlayer) |
140 { | 110 { |