diff options
-rw-r--r-- | Changelog-Trunk.txt | 5 | ||||
-rw-r--r-- | db/Changelog.txt | 1 | ||||
-rw-r--r-- | db/const.txt | 2 | ||||
-rw-r--r-- | db/item_db.txt | 2 | ||||
-rw-r--r-- | db/skill_cast_db.txt | 2 | ||||
-rw-r--r-- | src/map/battle.c | 4 | ||||
-rw-r--r-- | src/map/clif.c | 6 | ||||
-rw-r--r-- | src/map/map.h | 4 | ||||
-rw-r--r-- | src/map/pc.c | 7 | ||||
-rw-r--r-- | src/map/status.c | 55 |
10 files changed, 53 insertions, 35 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 0c38c6806..5c0f3093e 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,11 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/05/05
+ * OnEquip scripts will now trigger on log-on. [Skotlex]
+ * Infinite Endure will no longer give mdef bonus. [Skotlex]
+ * Removed bInfiniteEndure bonus, Eddga card now uses onequip/onunequip to
+ start/end infinite endure. [Skotlex]
+ * Fixed Kaahi's SP cost per heal. [Skotlex]
* Now when walkdelay is set to 0, characters will stop walking when hit,
but will not have any walk delay. (previously setting walk delay to 0 would
not even stop characters from walking when hit) [Skotlex]
diff --git a/db/Changelog.txt b/db/Changelog.txt index e8fe6f238..66b7bce4e 100644 --- a/db/Changelog.txt +++ b/db/Changelog.txt @@ -27,6 +27,7 @@ =========================
05/05
+ * Hammer fall's stun duration is now 1+lv seconds. [Skotlex]
* Removed drops from Bio Lab mobs than are not in X.2 [Playtester]
05/04
* All KA-spells are interruptable. [Skotlex]
diff --git a/db/const.txt b/db/const.txt index 6660f3e49..2c2c3b075 100644 --- a/db/const.txt +++ b/db/const.txt @@ -277,7 +277,7 @@ bNoMagicDamage 2003 bNoWeaponDamage 2004
bNoGemStone 2005
bNoCastCancel2 2006
-bInfiniteEndure 2007
+
bUnbreakableWeapon 2008
bUnbreakableArmor 2009
bUnbreakableHelm 2010
diff --git a/db/item_db.txt b/db/item_db.txt index 1e126c388..2758e843b 100644 --- a/db/item_db.txt +++ b/db/item_db.txt @@ -1257,7 +1257,7 @@ 4120,Sky_Petite_Card,Sky Petite Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bSubRace,RC_Dragon,30; },{},{}
4121,Phreeoni_Card,Phreeoni Card,6,,10,10,,,,,,,,2,,,,,{ bonus bHit,100; },{},{}
4122,Deviruchi_Card,Deviruchi Card,6,,10,10,,,,,,,,769,,,,,{ bonus bStr,1; bonus2 bResEff,Eff_Blind,10000; },{},{}
-4123,Eddga_Card,Eddga Card,6,,10,10,,,,,,,,64,,,,,{ bonus bInfiniteEndure,0; bonus bMaxHPrate,-25; },{},{}
+4123,Eddga_Card,Eddga Card,6,,10,10,,,,,,,,64,,,,,{ bonus bMaxHPrate,-25; },{ sc_start4 SC_ENDURE,60000,10,0,0,1; },{ sc_end SC_ENDURE; }
4124,Medusa_Card,Medusa Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bSubRace,RC_Demon,15; bonus2 bResEff,Eff_Stone,10000; },{},{}
4125,Deviace_Card,Deviace Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddRace,RC_DemiHuman,7; bonus2 bAddRace,RC_Brute,7; bonus2 bAddRace,RC_Plant,7; bonus2 bAddRace,RC_Insect,7; },{},{}
4126,Minorous_Card,Minorous Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddSize,2,15; bonus bBaseAtk,5; },{},{}
diff --git a/db/skill_cast_db.txt b/db/skill_cast_db.txt index 514c1fa4d..2c95327a1 100644 --- a/db/skill_cast_db.txt +++ b/db/skill_cast_db.txt @@ -200,7 +200,7 @@ //-- BS_REPAIRWEAPON
108,7500,0,0,0,0
//-- BS_HAMMERFALL
-110,0,0,0,0,6000:7000:8000:9000:10000:11000
+110,0,0,0,0,2000:3000:4000:5000:6000
//-- BS_ADRENALINE
111,0,0,0,30000:60000:90000:120000:150000,0
//-- BS_WEAPONPEFECT
diff --git a/src/map/battle.c b/src/map/battle.c index 97aaf1ee3..8a66cbedf 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -210,9 +210,9 @@ int battle_damage(struct block_list *src,struct block_list *target,int damage, i status_change_end(target, SC_CLOAKING, -1);
if (sc->data[SC_CHASEWALK].timer != -1)
status_change_end(target, SC_CHASEWALK, -1);
- if (sc->data[SC_ENDURE].timer != -1 && sc->data[SC_ENDURE].val1 <= 10) {
+ if (sc->data[SC_ENDURE].timer != -1 && !sc->data[SC_ENDURE].val4) {
//Endure count is only reduced by non-players on non-gvg maps.
- //if val1 is greater than 10, this is infinite endure. [Skotlex]
+ //val4 signals infinite endure. [Skotlex]
if (src && src->type != BL_PC && !map_flag_gvg(target->m)
&& --(sc->data[SC_ENDURE].val2) < 0)
status_change_end(target, SC_ENDURE, -1);
diff --git a/src/map/clif.c b/src/map/clif.c index 5f17946a9..6c7fe0142 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8239,12 +8239,6 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) npc_event_doall_id(script_config.loadmap_event_name, sd->bl.id), script_config.loadmap_event_name);
}
- if (
- pc_checkskill(sd,SG_SUN_COMFORT) ||
- pc_checkskill(sd,SG_MOON_COMFORT) ||
- pc_checkskill(sd,SG_STAR_COMFORT))
- status_calc_pc(sd,0);
-
if (pc_checkskill(sd, SG_DEVIL) && !pc_nextjobexp(sd))
clif_status_load(&sd->bl, SI_DEVIL, 1); //blindness [Komurka]
diff --git a/src/map/map.h b/src/map/map.h index 59307c071..1160d2862 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -532,7 +532,6 @@ struct map_session_data { unsigned no_magic_damage : 1;
unsigned no_weapon_damage : 1;
unsigned no_gemstone : 1;
- unsigned infinite_endure : 1;
unsigned intravision : 1; // Maya Purple Card effect allowing to see Hiding/Cloaking people [DracoRPG]
} special_state;
int char_id, login_id1, login_id2, sex;
@@ -1131,7 +1130,7 @@ enum { SP_DELAYRATE,SP_HP_DRAIN_RATE_RACE,SP_SP_DRAIN_RATE_RACE, // 1083-1085
SP_RESTART_FULL_RECOVER=2000,SP_NO_CASTCANCEL,SP_NO_SIZEFIX,SP_NO_MAGIC_DAMAGE,SP_NO_WEAPON_DAMAGE,SP_NO_GEMSTONE, // 2000-2005
- SP_NO_CASTCANCEL2,SP_INFINITE_ENDURE,SP_UNBREAKABLE_WEAPON,SP_UNBREAKABLE_ARMOR, SP_UNBREAKABLE_HELM, // 2006-2010
+ SP_NO_CASTCANCEL2,SP_FREE,SP_UNBREAKABLE_WEAPON,SP_UNBREAKABLE_ARMOR, SP_UNBREAKABLE_HELM, // 2006-2010
SP_UNBREAKABLE_SHIELD, SP_LONG_ATK_RATE, // 2011-2012
SP_CRIT_ATK_RATE, SP_CRITICAL_ADDRACE, SP_NO_REGEN, SP_ADDEFF_WHENHIT, SP_AUTOSPELL_WHENHIT, // 2013-2017
@@ -1142,6 +1141,7 @@ enum { SP_UNSTRIPABLE_WEAPON,SP_UNSTRIPABLE_ARMOR,SP_UNSTRIPABLE_HELM,SP_UNSTRIPABLE_SHIELD, // 2034-2037
SP_INTRAVISION, SP_ADD_MONSTER_DROP_ITEMGROUP, SP_SP_LOSS_RATE, // 2038-2040
SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE //2041
+ //Before adding another, note that 2007 (SP_FREE, previously Infinite Endure) is available!
};
enum {
diff --git a/src/map/pc.c b/src/map/pc.c index d2d73acb5..00f606051 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1479,13 +1479,6 @@ int pc_bonus(struct map_session_data *sd,int type,int val) if(sd->state.lr_flag != 2)
sd->special_state.no_gemstone = 1;
break;
- case SP_INFINITE_ENDURE:
- if(sd->state.lr_flag != 2) {
- sd->special_state.infinite_endure = 1;
- if (sd->sc.data[SC_ENDURE].timer == -1)
- sc_start(&sd->bl,SC_ENDURE,100,11,600000);
- }
- break;
case SP_INTRAVISION: // Maya Purple Card effect allowing to see Hiding/Cloaking people [DracoRPG]
if(sd->state.lr_flag != 2)
sd->special_state.intravision = 1;
diff --git a/src/map/status.c b/src/map/status.c index 2dd28505e..be58f7792 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -821,7 +821,15 @@ int status_calc_pc(struct map_session_data* sd,int first) if(!c)
continue;
data = itemdb_exists(c);
- if (!data || !data->script)
+ if(!data)
+ continue;
+ if(first&1 && data->equip_script)
+ { //Execute equip-script on login
+ run_script(data->equip_script,0,sd->bl.id,0);
+ if (!calculating)
+ return 1;
+ }
+ if(!data->script)
continue;
if(data->flag.no_equip) { //Card restriction checks.
if(map[sd->bl.m].flag.restricted && data->flag.no_equip&map[sd->bl.m].zone)
@@ -868,6 +876,14 @@ int status_calc_pc(struct map_session_data* sd,int first) continue;
sd->def += sd->inventory_data[index]->def;
+
+ if(first&1 && sd->inventory_data[index]->equip_script)
+ { //Execute equip-script on login
+ run_script(sd->inventory_data[index]->equip_script,0,sd->bl.id,0);
+ if (!calculating)
+ return 1;
+ }
+
if(sd->inventory_data[index]->type == 4) {
int r,wlv = sd->inventory_data[index]->wlv;
struct weapon_data *wd;
@@ -884,12 +900,15 @@ int status_calc_pc(struct map_session_data* sd,int first) if (wd == &sd->left_weapon) {
sd->attackrange_ += sd->inventory_data[index]->range;
- sd->state.lr_flag = 1;
- run_script(sd->inventory_data[index]->script,0,sd->bl.id,0);
- sd->state.lr_flag = 0;
+ if(sd->inventory_data[index]->script) {
+ sd->state.lr_flag = 1;
+ run_script(sd->inventory_data[index]->script,0,sd->bl.id,0);
+ sd->state.lr_flag = 0;
+ }
} else {
sd->attackrange += sd->inventory_data[index]->range;
- run_script(sd->inventory_data[index]->script,0,sd->bl.id,0);
+ if(sd->inventory_data[index]->script)
+ run_script(sd->inventory_data[index]->script,0,sd->bl.id,0);
}
if (!calculating) //Abort, run_script retriggered status_calc_pc. [Skotlex]
return 1;
@@ -908,9 +927,11 @@ int status_calc_pc(struct map_session_data* sd,int first) }
else if(sd->inventory_data[index]->type == 5) {
refinedef += sd->status.inventory[index].refine*refinebonus[0][0];
- run_script(sd->inventory_data[index]->script,0,sd->bl.id,0);
- if (!calculating) //Abort, run_script retriggered status_calc_pc. [Skotlex]
- return 1;
+ if(sd->inventory_data[index]->script) {
+ run_script(sd->inventory_data[index]->script,0,sd->bl.id,0);
+ if (!calculating) //Abort, run_script retriggered status_calc_pc. [Skotlex]
+ return 1;
+ }
}
}
@@ -2100,7 +2121,7 @@ int status_calc_mdef(struct block_list *bl, int mdef) return 90;
if(sc->data[SC_SKA].timer != -1) // [marquis007]
return 90; // should it up mdef too?
- if(sc->data[SC_ENDURE].timer!=-1)
+ if(sc->data[SC_ENDURE].timer!=-1 && sc->data[SC_ENDURE].val4 == 0)
mdef += sc->data[SC_ENDURE].val1;
}
@@ -3938,8 +3959,9 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val break;
case SC_ENDURE: /* インデュア */
if(tick <= 0) tick = 1000 * 60;
- calc_flag = 1; // for updating mdef
val2 = 7; // [Celest]
+ if (!val4)
+ calc_flag = 1; // for updating mdef
break;
case SC_AUTOBERSERK:
{
@@ -4279,8 +4301,8 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val break;
case SC_BERSERK: /* バ?サ?ク */
- if (sc->data[SC_ENDURE].timer == -1 || sc->data[SC_ENDURE].val1 <= 10)
- sc_start(bl, SC_ENDURE, 100, 11, tick);
+ if (sc->data[SC_ENDURE].timer == -1 || !sc->data[SC_ENDURE].val4)
+ sc_start4(bl, SC_ENDURE, 100, 1,0,0,1, tick);
if(sd && !(flag&4)){
sd->status.hp = sd->status.max_hp * 3;
sd->status.sp = 0;
@@ -4450,7 +4472,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val break;
}
val2 = 200*val1; //HP heal
- val3 = 5*val2; //SP cost
+ val3 = 5*val1; //SP cost
val4 = -1; //Kaahi Timer.
break;
case SC_BLESSING:
@@ -4876,7 +4898,6 @@ int status_change_end( struct block_list* bl , int type,int tid ) switch(type){ /* 異常の種類ごとの?理 */
case SC_PROVOKE: /* プロボック */
- case SC_ENDURE: // celest
case SC_CONCENTRATE: /* 集中力向上 */
case SC_BLESSING: /* ブレッシング */
case SC_ANGELUS: /* アンゼルス */
@@ -4977,6 +4998,10 @@ int status_change_end( struct block_list* bl , int type,int tid ) calc_flag = 1;
break;
+ case SC_ENDURE: // celest
+ calc_flag = (sc->data[type].val4==0);
+ break;
+
case SC_WEDDING: //結婚用(結婚衣裳になって?くのが?いとか)
{
struct view_data *vd = status_get_viewdata(bl);
@@ -5481,7 +5506,7 @@ int status_change_timer(int tid, unsigned int tick, int id, int data) break;
case SC_ENDURE: /* インデュア */
- if(sc->data[type].val1 > 10 || (sd && sd->special_state.infinite_endure))
+ if(sc->data[type].val4)
{
sc->data[type].timer=add_timer(1000*60+tick,status_change_timer, bl->id, data);
return 0;
|