Implemented bNoMadoGear item bonus

* Support for upcoming Charleston cards
This commit is contained in:
Jittapan Pluemsumran 2016-08-07 18:20:30 +07:00
parent 9912ad9656
commit 5f981bc1b1
No known key found for this signature in database
GPG Key ID: CE430096446F41D9
7 changed files with 17 additions and 2 deletions

View File

@ -439,10 +439,11 @@ bonus bSplashAddRange,n; Splash attack radius + n
NOTE: n=1 makes a 3*3 cells area, n=2 a 5*5 area, etc.
bonus2 bAddSkillBlow,sk,n; Knock back the target by n cells when using skill sk
bonus bNoKnockback,n; Character is no longer knocked back by enemy skills with such effect (n is meaningless)
bonus bNoGemStone,n; Skills requiring Gemstones do no require them (n is meaningless)
bonus bNoGemStone,n; Skills requiring Gemstones do not require them (n is meaningless)
NOTE: Hocus Pocus still requires 1 Yellow Gemstone, Ganbantein requirements not reduced
bonus bIntravision,n; Always see Hiding and Cloaking players/mobs (n is meaningless)
bonus bPerfectHide,n; Hidden/cloaked character is no longer detected by monsters with 'detector' mode (n is meaningless)
bonus bRestartFullRecover,n; When reviving, HP and SP are fully healed (n is meaningless)
bonus bClassChange,n; Gives a n/100% chance to change the attacked monster's class with normal attack
bonus bAddStealRate,n; Increases success rate of Steal skill by n/100%
bonus bNoMadoFuel,n; Nullify Magic Gear Fuel requirement for skills. (n is meaningless)

View File

@ -83,6 +83,7 @@ enum item_itemid
ITEMID_EMVERETARCON = 1011,
ITEMID_TRAP = 1065,
ITEMID_PAINT_BRUSH = 6122,
ITEMID_MAGIC_GEAR_FUEL = 6146,
ITEMID_STRANGE_EMBRYO = 6415,
ITEMID_STONE = 7049,
ITEMID_FIRE_BOTTLE = 7135,

View File

@ -468,7 +468,7 @@ enum _sp {
SP_ADD_CLASS_DROP_ITEMGROUP, SP_ADDMAXWEIGHT, SP_ADD_ITEMGROUP_HEAL_RATE, // 2071-2073
SP_HP_VANISH_RACE_RATE, SP_SP_VANISH_RACE_RATE, SP_ABSORB_DMG_MAXHP, SP_SUB_SKILL, SP_SUBDEF_ELE, // 2074-2078
SP_STATE_NORECOVER_RACE, SP_CRITICAL_RANGEATK, SP_MAGIC_ADDRACE2, SP_IGNORE_MDEF_RACE2_RATE, // 2079-2082
SP_WEAPON_ATK_RATE, SP_WEAPON_MATK_RATE, SP_DROP_ADDRACE, SP_DROP_ADDCLASS, // 2083-2086
SP_WEAPON_ATK_RATE, SP_WEAPON_MATK_RATE, SP_DROP_ADDRACE, SP_DROP_ADDCLASS, SP_NO_MADO_FUEL, // 2083-2087
};
enum _look {

View File

@ -3044,6 +3044,10 @@ void pc_bonus(struct map_session_data *sd,int type,int val)
if (sd->state.lr_flag != 2)
sd->bonus.weapon_matk_rate += val;
break;
case SP_NO_MADO_FUEL:
if (sd->state.lr_flag != 2)
sd->special_state.no_mado_fuel = 1;
break;
default:
if (running_npc_stat_calc_event) {
ShowWarning("pc_bonus: unknown bonus type %d %d in OnPCStatCalcEvent!\n", type, val);

View File

@ -262,6 +262,7 @@ struct map_session_data {
unsigned int perfect_hiding : 1; // [Valaris]
unsigned int no_knockback : 1;
unsigned int bonus_coma : 1;
unsigned int no_mado_fuel : 1; // Disable Magic_Gear_Fuel consumption [Secret]
} special_state;
uint32 login_id1, login_id2;
unsigned short class_; //This is the internal job ID used by the map server to simplify comparisons/queries/etc. [Skotlex]

View File

@ -662,6 +662,7 @@
script_set_constant("bIgnoreMdefRace2Rate", SP_IGNORE_MDEF_RACE2_RATE, false);
script_set_constant("bDropAddRace", SP_DROP_ADDRACE, false);
script_set_constant("bDropAddClass", SP_DROP_ADDCLASS, false);
script_set_constant("bNoMadoFuel", SP_NO_MADO_FUEL, false);
/* equip positions */
export_constant(EQI_HEAD_TOP);

View File

@ -16017,6 +16017,13 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
}
}
}
// Check requirement for Magic Gear Fuel
if (req.itemid[i] == ITEMID_MAGIC_GEAR_FUEL) {
if (sd->special_state.no_mado_fuel)
{
req.itemid[i] = req.amount[i] = 0;
}
}
}
break;
}