summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-16 19:35:27 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-16 19:35:27 +0000
commit0065f7bc871bb17c6d90994759cbf6c7dcee451b (patch)
treee4dbbe7e238f47d7424414ff0fb50f261ae61989 /src/map/pc.c
parentee11b9de9b49e292fd6fb0fbf15100288eb2be38 (diff)
downloadhercules-0065f7bc871bb17c6d90994759cbf6c7dcee451b.tar.gz
hercules-0065f7bc871bb17c6d90994759cbf6c7dcee451b.tar.bz2
hercules-0065f7bc871bb17c6d90994759cbf6c7dcee451b.tar.xz
hercules-0065f7bc871bb17c6d90994759cbf6c7dcee451b.zip
- Modified the bNoMagicDamage/bNoWeaponDamage bonuses to be a 0-100 setting. Meaning you can do bonus bNoMagicDamage,50; To make all magic damage be reduced by half. This bonus stack, so two cards with bNoMagicDamage,50 will give magic immunity.
- Removed setting gtb_pvp_only and replaced it with gtb_sc_immunity which specifies the threshold before the bNoMagicDamage starts blocking support statuses as well. ie: gtb_sc_imunity: 75 will mean that "bonus bNoMagicDamage,70;" reduces magic damage by 70%, but does not blocks heal or support status, while "bonus bNoMagicDamage,80;" does. - Updated GTB's card script to be "bonus bNoMagicDamage,100;" git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7212 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index e42aa454f..eeecf6a70 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1550,12 +1550,16 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
sd->special_state.no_sizefix = 1;
break;
case SP_NO_MAGIC_DAMAGE:
- if(sd->state.lr_flag != 2)
- sd->special_state.no_magic_damage = 1;
+ if(sd->state.lr_flag == 2)
+ break;
+ val+= sd->special_state.no_magic_damage;
+ sd->special_state.no_magic_damage = cap_value(val,0,100);
break;
case SP_NO_WEAPON_DAMAGE:
- if(sd->state.lr_flag != 2)
- sd->special_state.no_weapon_damage = 1;
+ if(sd->state.lr_flag == 2)
+ break;
+ val+= sd->special_state.no_weapon_damage;
+ sd->special_state.no_weapon_damage = cap_value(val,0,100);
break;
case SP_NO_GEMSTONE:
if(sd->state.lr_flag != 2)