This commit is contained in:
parent
d2826827df
commit
695de6313a
@ -11470,7 +11470,7 @@ Body:
|
|||||||
BuyingStore: true
|
BuyingStore: true
|
||||||
DropEffect: CLIENT
|
DropEffect: CLIENT
|
||||||
Script: |
|
Script: |
|
||||||
bonus bAbsorbDmgMaxHP,100;
|
bonus bAbsorbDmgMaxHP2,40;
|
||||||
- Id: 4625
|
- Id: 4625
|
||||||
AegisName: Timeholder_Card
|
AegisName: Timeholder_Card
|
||||||
Name: Time Holder Card
|
Name: Time Holder Card
|
||||||
|
@ -292,7 +292,8 @@ bonus2 bMagicAddRace2,mr,x; +x% magic damage against monster race mr
|
|||||||
|
|
||||||
bonus2 bSubSkill,sk,n; Reduces n% damage received from skill sk
|
bonus2 bSubSkill,sk,n; Reduces n% damage received from skill sk
|
||||||
|
|
||||||
bonus bAbsorbDmgMaxHP,n; If the damage received is more than n% of Max HP, the damage received is [TotalDamage] - [n% of MaxHP] (Doesn't stack, will use the highest value)
|
bonus bAbsorbDmgMaxHP,n; If the damage received is more than n% of Max HP, the damage received is [TotalDamage] - [n% of MaxHP] (Doesn't stack, will use the highest value) (Legacy rAthena behavior)
|
||||||
|
bonus bAbsorbDmgMaxHP2,n; If the damage received is more than n% of Max HP, the damage received is reduced to n% of MaxHP (Doesn't stack, will use the highest value) (Official behavior)
|
||||||
|
|
||||||
Atk/Def
|
Atk/Def
|
||||||
-------
|
-------
|
||||||
|
@ -1054,12 +1054,18 @@ static void battle_absorb_damage(struct block_list *bl, struct Damage *d) {
|
|||||||
struct map_session_data *sd = BL_CAST(BL_PC, bl);
|
struct map_session_data *sd = BL_CAST(BL_PC, bl);
|
||||||
if (!sd)
|
if (!sd)
|
||||||
return;
|
return;
|
||||||
|
dmg_ori = dmg_new = d->damage + d->damage2;
|
||||||
if (sd->bonus.absorb_dmg_maxhp) {
|
if (sd->bonus.absorb_dmg_maxhp) {
|
||||||
int hp = sd->bonus.absorb_dmg_maxhp * status_get_max_hp(bl) / 100;
|
int hp = sd->bonus.absorb_dmg_maxhp * status_get_max_hp(bl) / 100;
|
||||||
dmg_ori = dmg_new = d->damage + d->damage2;
|
|
||||||
if (dmg_ori > hp)
|
if (dmg_ori > hp)
|
||||||
dmg_new = dmg_ori - hp;
|
dmg_new = dmg_ori - hp;
|
||||||
}
|
}
|
||||||
|
if (sd->bonus.absorb_dmg_maxhp2) {
|
||||||
|
int hp = sd->bonus.absorb_dmg_maxhp2 * status_get_max_hp(bl) / 100;
|
||||||
|
if (dmg_ori > hp) {
|
||||||
|
dmg_new = hp;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -550,7 +550,7 @@ enum _sp {
|
|||||||
SP_IGNORE_DEF_CLASS_RATE, SP_REGEN_PERCENT_HP, SP_REGEN_PERCENT_SP, SP_SKILL_DELAY, SP_NO_WALK_DELAY, //2088-2092
|
SP_IGNORE_DEF_CLASS_RATE, SP_REGEN_PERCENT_HP, SP_REGEN_PERCENT_SP, SP_SKILL_DELAY, SP_NO_WALK_DELAY, //2088-2092
|
||||||
SP_LONG_SP_GAIN_VALUE, SP_LONG_HP_GAIN_VALUE, SP_SHORT_ATK_RATE, SP_MAGIC_SUBSIZE, SP_CRIT_DEF_RATE, // 2093-2097
|
SP_LONG_SP_GAIN_VALUE, SP_LONG_HP_GAIN_VALUE, SP_SHORT_ATK_RATE, SP_MAGIC_SUBSIZE, SP_CRIT_DEF_RATE, // 2093-2097
|
||||||
SP_MAGIC_SUBDEF_ELE, SP_REDUCE_DAMAGE_RETURN, SP_ADD_ITEM_SPHEAL_RATE, SP_ADD_ITEMGROUP_SPHEAL_RATE, // 2098-2101
|
SP_MAGIC_SUBDEF_ELE, SP_REDUCE_DAMAGE_RETURN, SP_ADD_ITEM_SPHEAL_RATE, SP_ADD_ITEMGROUP_SPHEAL_RATE, // 2098-2101
|
||||||
SP_WEAPON_SUBSIZE // 2102
|
SP_WEAPON_SUBSIZE, SP_ABSORB_DMG_MAXHP2 // 2102-2103
|
||||||
};
|
};
|
||||||
|
|
||||||
enum _look {
|
enum _look {
|
||||||
|
@ -3908,6 +3908,9 @@ void pc_bonus(struct map_session_data *sd,int type,int val)
|
|||||||
case SP_ABSORB_DMG_MAXHP: // bonus bAbsorbDmgMaxHP,n;
|
case SP_ABSORB_DMG_MAXHP: // bonus bAbsorbDmgMaxHP,n;
|
||||||
sd->bonus.absorb_dmg_maxhp = max(sd->bonus.absorb_dmg_maxhp, val);
|
sd->bonus.absorb_dmg_maxhp = max(sd->bonus.absorb_dmg_maxhp, val);
|
||||||
break;
|
break;
|
||||||
|
case SP_ABSORB_DMG_MAXHP2:
|
||||||
|
sd->bonus.absorb_dmg_maxhp2 = max(sd->bonus.absorb_dmg_maxhp2, val);
|
||||||
|
break;
|
||||||
case SP_CRITICAL_RANGEATK: // bonus bCriticalLong,n;
|
case SP_CRITICAL_RANGEATK: // bonus bCriticalLong,n;
|
||||||
if (sd->state.lr_flag != 2)
|
if (sd->state.lr_flag != 2)
|
||||||
sd->bonus.critical_rangeatk += val*10;
|
sd->bonus.critical_rangeatk += val*10;
|
||||||
|
@ -602,6 +602,7 @@ struct map_session_data {
|
|||||||
int ematk; // matk bonus from equipment
|
int ematk; // matk bonus from equipment
|
||||||
int eatk; // atk bonus from equipment
|
int eatk; // atk bonus from equipment
|
||||||
uint8 absorb_dmg_maxhp; // [Cydh]
|
uint8 absorb_dmg_maxhp; // [Cydh]
|
||||||
|
uint8 absorb_dmg_maxhp2;
|
||||||
short critical_rangeatk;
|
short critical_rangeatk;
|
||||||
short weapon_atk_rate, weapon_matk_rate;
|
short weapon_atk_rate, weapon_matk_rate;
|
||||||
} bonus;
|
} bonus;
|
||||||
|
@ -843,6 +843,7 @@
|
|||||||
export_constant2("bCritDefRate",SP_CRIT_DEF_RATE);
|
export_constant2("bCritDefRate",SP_CRIT_DEF_RATE);
|
||||||
export_constant2("bMagicSubDefEle", SP_MAGIC_SUBDEF_ELE);
|
export_constant2("bMagicSubDefEle", SP_MAGIC_SUBDEF_ELE);
|
||||||
export_constant2("bReduceDamageReturn",SP_REDUCE_DAMAGE_RETURN);
|
export_constant2("bReduceDamageReturn",SP_REDUCE_DAMAGE_RETURN);
|
||||||
|
export_constant2("bAbsorbDmgMaxHP2", SP_ABSORB_DMG_MAXHP2);
|
||||||
export_constant2("bAddItemSPHealRate", SP_ADD_ITEM_SPHEAL_RATE);
|
export_constant2("bAddItemSPHealRate", SP_ADD_ITEM_SPHEAL_RATE);
|
||||||
export_constant2("bAddItemGroupSPHealRate", SP_ADD_ITEMGROUP_SPHEAL_RATE);
|
export_constant2("bAddItemGroupSPHealRate", SP_ADD_ITEMGROUP_SPHEAL_RATE);
|
||||||
export_constant2("bWeaponSubSize", SP_WEAPON_SUBSIZE);
|
export_constant2("bWeaponSubSize", SP_WEAPON_SUBSIZE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user