summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c14
-rw-r--r--src/map/map.c11
-rw-r--r--src/map/map.h18
-rw-r--r--src/map/skill.c20
-rw-r--r--src/map/status.c6
-rw-r--r--src/map/status.h1
6 files changed, 19 insertions, 51 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 5aa862c67..4f164dd3c 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -287,15 +287,10 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
sc = status_get_sc(bl);
- if((flag&(BF_MAGIC|BF_LONG)) == BF_LONG &&
- map_getcell(bl->m, bl->x, bl->y, CELL_CHKPNEUMA) &&
- skill_num != NPC_GUIDEDATTACK)
- return 0;
-
if (sc && sc->count) {
//First, sc_*'s that reduce damage to 0.
- if (sc->data[SC_SAFETYWALL] && flag&BF_SHORT && skill_num != NPC_GUIDEDATTACK
- ) {
+ if( sc->data[SC_SAFETYWALL] && flag&BF_SHORT && skill_num != NPC_GUIDEDATTACK )
+ {
struct skill_unit_group *group = (struct skill_unit_group *)sc->data[SC_SAFETYWALL]->val3;
if (group) {
if (--group->val2<=0)
@@ -304,7 +299,10 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
}
status_change_end(bl,SC_SAFETYWALL,-1);
}
-
+
+ if( sc->data[SC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG && skill_num != NPC_GUIDEDATTACK )
+ return 0;
+
if((sce=sc->data[SC_AUTOGUARD]) && flag&BF_WEAPON &&
!(skill_get_nk(skill_num)&NK_NO_CARDFIX_ATK) &&
rand()%100 < sce->val2)
diff --git a/src/map/map.c b/src/map/map.c
index 04ff50e23..2d11b5725 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2176,16 +2176,10 @@ int map_getcellp(struct map_data* m,int x,int y,cell_t cellchk)
// base cell type checks
case CELL_CHKNPC:
return (cell.npc);
- case CELL_CHKPNEUMA:
- return (cell.pneuma);
- case CELL_CHKSAFETYWALL:
- return (cell.safetywall);
case CELL_CHKBASILICA:
return (cell.basilica);
case CELL_CHKLANDPROTECTOR:
return (cell.landprotector);
- case CELL_CHKREGEN:
- return (cell.regen);
case CELL_CHKICEWALL:
return (cell.icewall);
case CELL_CHKNOVENDING:
@@ -2235,13 +2229,8 @@ void map_setcell(int m,int x,int y,int cell)
case CELL_CLRICEWALL: map[m].cell[j].icewall = 0; break;
case CELL_SETBASILICA: map[m].cell[j].basilica = 1; break;
case CELL_CLRBASILICA: map[m].cell[j].basilica = 0; break;
- case CELL_SETPNEUMA: map[m].cell[j].pneuma = 1; break;
- case CELL_CLRPNEUMA: map[m].cell[j].pneuma = 0; break;
- case CELL_SETSAFETYWALL: map[m].cell[j].safetywall = 1; break;
- case CELL_CLRSAFETYWALL: map[m].cell[j].safetywall = 0; break;
case CELL_SETLANDPROTECTOR: map[m].cell[j].landprotector = 1; break;
case CELL_CLRLANDPROTECTOR: map[m].cell[j].landprotector = 0; break;
- case CELL_SETREGEN: map[m].cell[j].regen = 1; break;
case CELL_SETNOVENDING: map[m].cell[j].novending = 1; break;
case CELL_CLRNOVENDING: map[m].cell[j].novending = 0; break;
default:
diff --git a/src/map/map.h b/src/map/map.h
index 67e6d04fc..ffa4685fc 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -1109,9 +1109,6 @@ enum _look {
// CELLs for non-permanent cell-based effects (Pneuma, Basilica, Npcs, etc)
#define CELL_NPC 0x1
-#define CELL_REGEN 0x2
-#define CELL_PNEUMA 0x4
-#define CELL_SAFETYWALL 0x8
#define CELL_LANDPROTECTOR 0x10
#define CELL_BASILICA 0x20
#define CELL_NOVENDING 0x40
@@ -1132,9 +1129,6 @@ typedef enum {
CELL_CHKNOREACH, // Same as NOPASS, but ignores the cell-stacking mod.
CELL_CHKNPC=0x10, // タッチタイプのNPC(セルタイプ0x80フラグ)
- CELL_CHKREGEN, // cells that improve regeneration
- CELL_CHKPNEUMA,
- CELL_CHKSAFETYWALL,
CELL_CHKBASILICA, // バジリカ(セルタイプ0x40フラグ)
CELL_CHKLANDPROTECTOR,
CELL_CHKICEWALL,
@@ -1148,14 +1142,9 @@ enum {
CELL_CLRNPC,
CELL_SETBASILICA, // バジリカをセット
CELL_CLRBASILICA, // バジリカをクリア
- CELL_SETREGEN, // set regen cell
- CELL_SETLANDPROTECTOR, //Set/Clear Magnetic Earth
+ CELL_SETLANDPROTECTOR=0x15, //Set/Clear Magnetic Earth
CELL_CLRLANDPROTECTOR,
- CELL_SETPNEUMA,
- CELL_CLRPNEUMA,
- CELL_SETSAFETYWALL,
- CELL_CLRSAFETYWALL,
- CELL_SETICEWALL,
+ CELL_SETICEWALL=0x1b,
CELL_CLRICEWALL,
CELL_SETNOVENDING,
CELL_CLRNOVENDING,
@@ -1172,9 +1161,6 @@ struct mapcell
// dynamic flags
unsigned char
npc : 1,
- regen : 1,
- pneuma : 1,
- safetywall : 1,
landprotector : 1,
basilica : 1,
icewall : 1,
diff --git a/src/map/skill.c b/src/map/skill.c
index 9a7fbada7..92c58809e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4191,7 +4191,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case SC_SMA: case SC_SPEEDUP0: case SC_NOCHAT:
case SC_ANKLE: case SC_SPIDERWEB: case SC_JAILED:
case SC_ITEMBOOST: case SC_EXPBOOST: case SC_LIFEINSURANCE:
- case SC_BOSSMAPINFO:
+ case SC_BOSSMAPINFO: case SC_PNEUMA:
continue;
}
if(i==SC_BERSERK) tsc->data[i]->val2=0; //Mark a dispelled berserk to avoid setting hp to 100 by setting hp penalty to 0.
@@ -6502,6 +6502,11 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned
sc_start4(bl,type,100,sg->skill_lv,sg->group_id,(int)sg,0,sg->limit);
break;
+ case UNT_PNEUMA:
+ if (!sce)
+ sc_start4(bl,type,100,sg->skill_lv,sg->group_id,0,0,sg->limit);
+ break;
+
case UNT_WARP_WAITING:
if(bl->type==BL_PC){
struct map_session_data *sd = (struct map_session_data *)bl;
@@ -7057,6 +7062,7 @@ int skill_unit_onout (struct skill_unit *src, struct block_list *bl, unsigned in
switch(sg->unit_id){
case UNT_SAFETYWALL:
+ case UNT_PNEUMA:
if (sce)
status_change_end(bl,type,-1);
break;
@@ -9234,12 +9240,6 @@ struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int
map_addblock(&unit->bl);
switch (group->skill_id) {
- case AL_PNEUMA:
- skill_unitsetmapcell(unit,AL_PNEUMA,group->skill_lv,CELL_SETPNEUMA);
- break;
- case MG_SAFETYWALL:
- skill_unitsetmapcell(unit,MG_SAFETYWALL,group->skill_lv,CELL_SETSAFETYWALL);
- break;
case SA_LANDPROTECTOR:
skill_unitsetmapcell(unit,SA_LANDPROTECTOR,group->skill_lv,CELL_SETLANDPROTECTOR);
break;
@@ -9281,12 +9281,6 @@ int skill_delunit (struct skill_unit* unit)
map_foreachincell(skill_unit_effect,unit->bl.m,unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,gettick(),4);
switch (group->skill_id) {
- case AL_PNEUMA:
- skill_unitsetmapcell(unit,AL_PNEUMA,group->skill_lv,CELL_CLRPNEUMA);
- break;
- case MG_SAFETYWALL:
- skill_unitsetmapcell(unit,MG_SAFETYWALL,group->skill_lv,CELL_CLRSAFETYWALL);
- break;
case SA_LANDPROTECTOR:
skill_unitsetmapcell(unit,SA_LANDPROTECTOR,group->skill_lv,CELL_CLRLANDPROTECTOR);
break;
diff --git a/src/map/status.c b/src/map/status.c
index cf999e37f..85c17215d 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -153,6 +153,7 @@ void initChangeTables(void)
add_sc(MG_FROSTDIVER, SC_FREEZE);
add_sc(MG_STONECURSE, SC_STONE);
add_sc(AL_RUWACH, SC_RUWACH);
+ add_sc(AL_PNEUMA, SC_PNEUMA);
set_sc(AL_INCAGI, SC_INCREASEAGI, SI_INCREASEAGI, SCB_AGI|SCB_SPEED);
set_sc(AL_DECAGI, SC_DECREASEAGI, SI_DECREASEAGI, SCB_AGI|SCB_SPEED);
set_sc(AL_CRUCIS, SC_SIGNUMCRUCIS, SI_SIGNUMCRUCIS, SCB_DEF);
@@ -4597,7 +4598,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
if( bl->type == BL_MOB && ((TBL_MOB*)bl)->class_ == MOBID_EMPERIUM )
{
- if( type != SC_SAFETYWALL )
+ if( type != SC_SAFETYWALL && type != SC_PNEUMA )
return 0; //Emperium can't be afflicted by status changes
}
@@ -7060,6 +7061,7 @@ int status_change_clear_buffs (struct block_list* bl, int type)
case SC_DANCING:
case SC_GUILDAURA:
case SC_SAFETYWALL:
+ case SC_PNEUMA:
case SC_NOCHAT:
case SC_JAILED:
case SC_ANKLE:
@@ -7216,8 +7218,6 @@ static int status_natural_heal(DBKey key,void * data,va_list ap)
if(!vd) vd = status_get_viewdata(bl);
if(vd && vd->dead_sit == 2)
bonus++;
- if(map_getcell(bl->m,bl->x,bl->y,CELL_CHKREGEN))
- bonus++;
if(regen->state.gc)
bonus++;
}
diff --git a/src/map/status.h b/src/map/status.h
index eac4b9d55..d204c3f39 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -283,6 +283,7 @@ enum sc_type {
SC_INCMDEFRATE, // Mdef Potion
SC_HPREGEN, // Life Potion
SC_INCHEALRATE, // Regeneration Potion
+ SC_PNEUMA,
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
};
int SkillStatusChangeTable(int skill);