summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-20 21:25:47 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-20 21:25:47 +0000
commit38d6992791ab2ee1713093be2cfb3077a689d28e (patch)
tree52d2efe662580f475fe29dc51fe1c1e2e3866b62 /src/map/status.c
parent99f319c197d5e783eef978859535287b45c9f989 (diff)
downloadhercules-38d6992791ab2ee1713093be2cfb3077a689d28e.tar.gz
hercules-38d6992791ab2ee1713093be2cfb3077a689d28e.tar.bz2
hercules-38d6992791ab2ee1713093be2cfb3077a689d28e.tar.xz
hercules-38d6992791ab2ee1713093be2cfb3077a689d28e.zip
- The max level of NPC_SPLASHATTACK is now 1.
- Implemented NPC_DEFENDER. Reduces ranged Physical+Misc damage by 80% - Improved the battle config reader so it accepts hexadecimal values. Updated the monster_ai description to make use of this. - Added monster_ai&0x200. When set, mob skill delays are shared. That is, if the mob has several lines with the same skill, when the skill is used, the delay will be set to all of them, not just the one entry used. - Cleaned mob.c to use hex values when refering mob_ai - Corrected NPC_BARRIER so it grants 100 def/mdef (and not just mdef) - Weapon ATK bonuses will now only apply to watk and NOT watk2 on players (on players watk2 is refine bonus) - Corrected NPC_KEEPING. it should give 90 def, not 100 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9277 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c34
1 files changed, 24 insertions, 10 deletions
diff --git a/src/map/status.c b/src/map/status.c
index ef3e73021..7cd554b3e 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -215,7 +215,7 @@ void initChangeTables(void) {
add_sc(NPC_SLEEPATTACK, SC_SLEEP);
set_sc(NPC_KEEPING, SC_KEEPING, SI_BLANK, SCB_DEF);
add_sc(NPC_DARKBLESSING, SC_COMA);
- set_sc(NPC_BARRIER, SC_BARRIER, SI_BLANK, SCB_MDEF);
+ set_sc(NPC_BARRIER, SC_BARRIER, SI_BLANK, SCB_MDEF|SCB_DEF);
add_sc(NPC_LICK, SC_STUN);
set_sc(NPC_HALLUCINATION, SC_HALLUCINATION, SI_HALLUCINATION, SCB_NONE);
add_sc(NPC_REBIRTH, SC_KAIZEL);
@@ -2946,12 +2946,17 @@ void status_calc_bl(struct block_list *bl, unsigned long flag)
if(flag&SCB_WATK) {
status->rhw.atk = status_calc_watk(bl, sc, b_status->rhw.atk);
- status->rhw.atk2 = status_calc_watk(bl, sc, b_status->rhw.atk2);
+ if (!sd) //Should not affect weapon refine bonus
+ status->rhw.atk2 = status_calc_watk(bl, sc, b_status->rhw.atk2);
if(status->lhw && b_status->lhw && b_status->lhw->atk) {
- if (sd) sd->state.lr_flag = 1;
- status->lhw->atk = status_calc_watk(bl, sc, b_status->lhw->atk);
- status->lhw->atk2 = status_calc_watk(bl, sc, b_status->lhw->atk2);
- if (sd) sd->state.lr_flag = 0;
+ if (sd) {
+ sd->state.lr_flag = 1;
+ status->lhw->atk = status_calc_watk(bl, sc, b_status->lhw->atk);
+ sd->state.lr_flag = 0;
+ } else {
+ status->lhw->atk = status_calc_watk(bl, sc, b_status->lhw->atk);
+ status->lhw->atk2= status_calc_watk(bl, sc, b_status->lhw->atk2);
+ }
}
}
@@ -3512,16 +3517,18 @@ static signed char status_calc_def(struct block_list *bl, struct status_change *
if(sc->data[SC_BERSERK].timer!=-1)
return 0;
- if(sc->data[SC_KEEPING].timer!=-1)
- return 100;
if(sc->data[SC_SKA].timer != -1)
return sc->data[SC_SKA].val3;
- if (sc->data[SC_DEFENCE].timer != -1) //[orn]
- def += sc->data[SC_DEFENCE].val2 ;
+ if(sc->data[SC_BARRIER].timer!=-1)
+ return 100;
+ if(sc->data[SC_KEEPING].timer!=-1)
+ return 90;
if(sc->data[SC_STEELBODY].timer!=-1)
return 90;
if(sc->data[SC_DRUMBATTLE].timer!=-1)
def += sc->data[SC_DRUMBATTLE].val3;
+ if (sc->data[SC_DEFENCE].timer != -1) //[orn]
+ def += sc->data[SC_DEFENCE].val2 ;
if(sc->data[SC_INCDEFRATE].timer!=-1)
def += def * sc->data[SC_INCDEFRATE].val1/100;
if(sc->data[SC_FREEZE].timer!=-1)
@@ -5611,6 +5618,13 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
if (map[bl->m].flag.pvp)
tick /=2;
break;
+ case SC_ARMOR:
+ //NPC_DEFENDER:
+ val2 = 80; //Damage reduction
+ //Attack requirements to be blocked:
+ val3 = BF_LONG; //Range
+ val4 = BF_WEAPON|BF_MISC; //Type
+ break;
case SC_INTRAVISION:
case SC_ARMOR_ELEMENT:
//Place here SCs that have no SCB_* data, no skill associated, no ICON