summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--db/Changelog.txt1
-rw-r--r--db/const.txt5
-rw-r--r--db/item_db.txt6
-rw-r--r--doc/item_bonus.txt9
-rw-r--r--sql-files/item_db.sql6
-rw-r--r--src/map/pc.c23
7 files changed, 35 insertions, 19 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index d2721d022..c39a10def 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,10 @@ 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.
2007/09/09
+ * Modified bonus3 bAddEff/bAddEffWhenHit so that the last parameter is now
+ passed directly as "trigger" flag. The possible trigger values are
+ ATF_LONG, ATF_SHORT, ATF_TARGET, ATF_SELF. Explanation added to
+ doc/item_bonus.txt [Skotlex]
* Updated sql files [Playtester]
2007/09/08
* Adjusted a spot that still blocked GL's skills on login [ultramage]
diff --git a/db/Changelog.txt b/db/Changelog.txt
index 72f4e9cbe..67f61d831 100644
--- a/db/Changelog.txt
+++ b/db/Changelog.txt
@@ -28,6 +28,7 @@
========================
09/09
+ * Updated some cards to use the new format of bonus3 bAddEff* [Skotlex]
* Commented unimplemented mob skills [Playtester]
* Added Cursed Abbey mob skills thanks to Doddler [Playtester]
- also fixed level of MVP heal which was once again 10 instead of 11
diff --git a/db/const.txt b/db/const.txt
index 9b5c308cc..1114f4cea 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -451,6 +451,11 @@ BF_LONG 0x0040
BF_SKILL 0x0100
BF_NORMAL 0x0200
+ATF_SELF 0x01
+ATF_TARGET 0x02
+ATF_SHORT 0x04
+ATF_LONG 0x08
+
IG_BlueBox 1
IG_VioletBox 2
IG_CardAlbum 3
diff --git a/db/item_db.txt b/db/item_db.txt
index 574b3f0af..7f0c8e5f3 100644
--- a/db/item_db.txt
+++ b/db/item_db.txt
@@ -1649,7 +1649,7 @@
4330,Dark_Snake_Lord_Card,Evil Snake Lord Card,6,,10,10,,,,,,,,769,,,,,{ bonus bInt,3; bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Curse,10000; },{},{}
4331,Heater_Card,Heater Card,6,,10,10,,,,,,,,136,,,,,{ bonus bCritical,3; if(BaseClass == Job_Swordman) bonus bFlee2,3; },{},{}
4332,Waste_Stove_Card,Waste Stove Card,6,,10,10,,,,,,,,16,,,,,{ bonus bBaseAtk,5; bonus bInt,1; if(isequipped(4185,4293,4312)) { bonus bStr,3; bonus bMaxSP,80; bonus bBaseAtk,25; bonus3 bAutoSpell,32,5,10; bonus2 bSkillAtk,271,10; if(BaseJob == Job_Monk) { bonus bUseSPrate,-10; bonus bNoCastCancel,0; } } },{},{}
-4333,Venomous_Card,Venomous Card,6,,10,10,,,,,,,,16,,,,,{ bonus3 bAddEffWhenHit,Eff_Poison,3000,2; },{},{}
+4333,Venomous_Card,Venomous Card,6,,10,10,,,,,,,,16,,,,,{ bonus3 bAddEffWhenHit,Eff_Poison,3000,ATF_TARGET|ATF_SELF; },{},{}
4334,Noxious_Card,Noxious Card,6,,10,10,,,,,,,,4,,,,,{ bonus bLongAtkDef,10; bonus2 bSubEle,Ele_Neutral,10; },{},{}
4335,Pitman_Card,Pitman Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bSkillAtk,90,5; bonus2 bSkillAtk,91,5; },{},{ heal 0,-50; }
4336,Ungoliant_Card,Ungoliant Card,6,,10,10,,,,,,,,769,,,,,{ bonus bHPrecovRate,10; bonus2 bResEff,Eff_Bleeding,10000; },{},{}
@@ -1699,7 +1699,7 @@
4380,Ferus_Card,Red Ferus Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bSkillAtk,80,5; bonus2 bSkillAtk,83,5; },{},{ heal 0,-50; }
4381,Ferus__Card,Green Ferus Card,6,,10,10,,,,,,,,64,,,,,{ bonus bVit,1; bonus bMaxHPrate,10; if(isequipped(4297,4234,4252,4178)) { bonus bDex,5; bonus2 bSkillAtk,394,5; bonus2 bSkillAtk,324,10; bonus2 bSkillAtk,316,10; if(BaseJob == Job_Bard || BaseJob == Job_Dancer) { bonus3 bAutoSpellWhenHit,489,2,50; } } },{},{}
4382,Novus__Card,Yellow Novus Card,6,,10,10,,,,,,,,16,,,,,{ bonus bMaxHP,500; bonus bHPrecovRate,10; if(isequipped(4208,4258,4325,4327)) { bonus bInt,3; bonus2 bSkillAtk,91,10; bonus2 bSkillAtk,21,10; if(BaseJob == Job_Sage) { bonus bMagicDamageReturn,20; bonus2 bAddMonsterDropItem,716,100; bonus2 bAddMonsterDropItem,715,100; bonus bCastrate,-20; } } },{},{}
-4383,Novus_Card,Red Novus Card,6,,10,10,,,,,,,,16,,,,,{ bonus3 bAddEffWhenHit,Eff_Confusion,3000,2; },{},{}
+4383,Novus_Card,Red Novus Card,6,,10,10,,,,,,,,16,,,,,{ bonus3 bAddEffWhenHit,Eff_Confusion,3000,ATF_TARGET|ATF_SELF; },{},{}
4384,Hydro_Card,Hydro Card,6,,10,10,,,,,,,,136,,,,,{ bonus3 bAutoSpell,277,1,100; },{},{}
4385,Dragon_Egg_Card,Dragon Egg Card,6,,10,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12048,RC_Dragon,300; },{},{}
4386,Detale_Card,Detale Card,6,,10,10,,,,,,,,16,,,,,{ bonus bMdef,-20; bonus2 bResEff,Eff_Freeze,10000; bonus5 bAutoSpellWhenHit,288,1,50,BF_MAGIC,0; },{},{}
@@ -1720,7 +1720,7 @@
4401,Alicel_Card,Alicel Card,6,,10,10,,,,,,,,16,,,,,{ bonus bFlee,10; bonus bDef,-5; },{},{}
4402,Aliot_Card,Aliot Card,6,,10,10,,,,,,,,4,,,,,{ if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) { bonus bStr, 2; bonus bMaxHPrate, 5; } if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) { bonus bInt, 2; bonus bMaxSPrate, 5; } },{},{}
4403,Kiel_Card,Kiel Card,6,,10,10,,,,,,,,769,,,,,{ bonus bDelayRate,-30; },{},{}
-4404,Skogul_Card,Skogul Card,6,,10,10,,,,,,,,16,,,,,{ bonus3 bAddEffWhenHit,Eff_Bleeding,3000,2; },{},{}
+4404,Skogul_Card,Skogul Card,6,,10,10,,,,,,,,16,,,,,{ bonus3 bAddEffWhenHit,Eff_Bleeding,3000,ATF_TARGET|ATF_SELF; },{},{}
4405,Frus_Card,Frus Card,6,,10,10,,,,,,,,16,,,,,{ bonus bMagicDamageReturn,getrefine()*2; if(BaseClass==Job_Mage) bonus bMdef,3; },{},{}
4406,Skeggiold_Card,Skeggiold Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bMagicAddRace,RC_Demon,2; },{},{}
4407,Randgris_Card,Randgris Card,6,,10,10,,,,,,,,2,,,,,{ bonus bUnbreakableWeapon,0; bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; bonus2 bAddRace2,5,10; bonus3 bAutoSpell,289,1,10; },{},{}
diff --git a/doc/item_bonus.txt b/doc/item_bonus.txt
index ed32afc5f..fd6a5becf 100644
--- a/doc/item_bonus.txt
+++ b/doc/item_bonus.txt
@@ -163,7 +163,7 @@ bonus2 bCriticalAddRace,n,r; Critical + n vs. enemies of race r
r: 0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect, 5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon, 10=Boss monster, 11=Other than (normal monster) boss monster
bonus2 bHPRegenRate,n,x; Gain n HP every x milliseconds
bonus2 bHPLossRate,n,x; Lose n HP every x milliseconds
-bonus2 bAddEffWhenHit,n,x; n% chance to cause x state to the enemy when
+bonus2 bAddEffWhenHit,n,x; x/100% chance to cause n state to the enemy when
being hit by physical damage
bonus2 bAddEffWhenHitShort,n,x; n% chance to cause x state to the enemy when
being hit by physical close range damage
@@ -254,6 +254,13 @@ bonus2 bAddMonsterDropItemGroup,n,x; x% chance to get an item of group type n wh
if 'x' is negative value, then it's a part of formula
chance = -x*(killed_mob_level/10)+1
+bonus3 bAddEff,n,x,y; Adds a x/10000 chance to cause effect n to the target when attacking (e.g. x=100 makes 1% chance, x=10000 makes 100% chance, etc). y is the trigger criteria:
+ ATF_SELF: Trigger effect on self.
+ ATF_TARGET: Trigger effect on target (default)
+ ATF_SHORT: Trigger on melee attacks
+ ATF_LONG: Trigger in ranged attacks (default: trigger on all attacks)
+
+bonus3 bAddEffWhenHit,n,x,y; x/10000 chance to cause n state to the enemy when being hit by physical damage. y is the trigger criteria (same as bAddEff trigger criteria).
bonus3 bAddMonsterDropItemGroup,n,x,y; y% chance to get an item of group type n when you kill a
monster of race x (Check db/item_group_db.txt)
diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql
index a7efb8373..036814703 100644
--- a/sql-files/item_db.sql
+++ b/sql-files/item_db.sql
@@ -1680,7 +1680,7 @@ REPLACE INTO `item_db` VALUES (4329,'Phendark_Card','Phendark Card',6,NULL,10,10
REPLACE INTO `item_db` VALUES (4330,'Dark_Snake_Lord_Card','Evil Snake Lord Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,' bonus bInt,3; bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Curse,10000; ',NULL,NULL);
REPLACE INTO `item_db` VALUES (4331,'Heater_Card','Heater Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,' bonus bCritical,3; if(BaseClass == Job_Swordman) bonus bFlee2,3; ',NULL,NULL);
REPLACE INTO `item_db` VALUES (4332,'Waste_Stove_Card','Waste Stove Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,' bonus bBaseAtk,5; bonus bInt,1; if(isequipped(4185,4293,4312)) { bonus bStr,3; bonus bMaxSP,80; bonus bBaseAtk,25; bonus3 bAutoSpell,32,5,10; bonus2 bSkillAtk,271,10; if(BaseJob == Job_Monk) { bonus bUseSPrate,-10; bonus bNoCastCancel,0; } } ',NULL,NULL);
-REPLACE INTO `item_db` VALUES (4333,'Venomous_Card','Venomous Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,' bonus3 bAddEffWhenHit,Eff_Poison,3000,2; ',NULL,NULL);
+REPLACE INTO `item_db` VALUES (4333,'Venomous_Card','Venomous Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,' bonus3 bAddEffWhenHit,Eff_Poison,3000,ATF_TARGET|ATF_SELF; ',NULL,NULL);
REPLACE INTO `item_db` VALUES (4334,'Noxious_Card','Noxious Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,' bonus bLongAtkDef,10; bonus2 bSubEle,Ele_Neutral,10; ',NULL,NULL);
REPLACE INTO `item_db` VALUES (4335,'Pitman_Card','Pitman Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,' bonus2 bSkillAtk,90,5; bonus2 bSkillAtk,91,5; ',NULL,' heal 0,-50; ');
REPLACE INTO `item_db` VALUES (4336,'Ungoliant_Card','Ungoliant Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,' bonus bHPrecovRate,10; bonus2 bResEff,Eff_Bleeding,10000; ',NULL,NULL);
@@ -1730,7 +1730,7 @@ REPLACE INTO `item_db` VALUES (4379,'Acidus__Card','Blue Acidus Card',6,NULL,10,
REPLACE INTO `item_db` VALUES (4380,'Ferus_Card','Red Ferus Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,' bonus2 bSkillAtk,80,5; bonus2 bSkillAtk,83,5; ',NULL,' heal 0,-50; ');
REPLACE INTO `item_db` VALUES (4381,'Ferus__Card','Green Ferus Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,' bonus bVit,1; bonus bMaxHPrate,10; if(isequipped(4297,4234,4252,4178)) { bonus bDex,5; bonus2 bSkillAtk,394,5; bonus2 bSkillAtk,324,10; bonus2 bSkillAtk,316,10; if(BaseJob == Job_Bard || BaseJob == Job_Dancer) { bonus3 bAutoSpellWhenHit,489,2,50; } } ',NULL,NULL);
REPLACE INTO `item_db` VALUES (4382,'Novus__Card','Yellow Novus Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,' bonus bMaxHP,500; bonus bHPrecovRate,10; if(isequipped(4208,4258,4325,4327)) { bonus bInt,3; bonus2 bSkillAtk,91,10; bonus2 bSkillAtk,21,10; if(BaseJob == Job_Sage) { bonus bMagicDamageReturn,20; bonus2 bAddMonsterDropItem,716,100; bonus2 bAddMonsterDropItem,715,100; bonus bCastrate,-20; } } ',NULL,NULL);
-REPLACE INTO `item_db` VALUES (4383,'Novus_Card','Red Novus Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,' bonus3 bAddEffWhenHit,Eff_Confusion,3000,2; ',NULL,NULL);
+REPLACE INTO `item_db` VALUES (4383,'Novus_Card','Red Novus Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,' bonus3 bAddEffWhenHit,Eff_Confusion,3000,ATF_TARGET|ATF_SELF; ',NULL,NULL);
REPLACE INTO `item_db` VALUES (4384,'Hydro_Card','Hydro Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,' bonus3 bAutoSpell,277,1,100; ',NULL,NULL);
REPLACE INTO `item_db` VALUES (4385,'Dragon_Egg_Card','Dragon Egg Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,' bonus3 bAddMonsterDropItem,12048,RC_Dragon,300; ',NULL,NULL);
REPLACE INTO `item_db` VALUES (4386,'Detale_Card','Detale Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,' bonus bMdef,-20; bonus2 bResEff,Eff_Freeze,10000; bonus5 bAutoSpellWhenHit,288,1,50,BF_MAGIC,0; ',NULL,NULL);
@@ -1751,7 +1751,7 @@ REPLACE INTO `item_db` VALUES (4400,'Aliza_Card','Aliza Card',6,NULL,10,10,NULL,
REPLACE INTO `item_db` VALUES (4401,'Alicel_Card','Alicel Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,' bonus bFlee,10; bonus bDef,-5; ',NULL,NULL);
REPLACE INTO `item_db` VALUES (4402,'Aliot_Card','Aliot Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,' if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) { bonus bStr, 2; bonus bMaxHPrate, 5; } if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) { bonus bInt, 2; bonus bMaxSPrate, 5; } ',NULL,NULL);
REPLACE INTO `item_db` VALUES (4403,'Kiel_Card','Kiel Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,' bonus bDelayRate,-30; ',NULL,NULL);
-REPLACE INTO `item_db` VALUES (4404,'Skogul_Card','Skogul Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,' bonus3 bAddEffWhenHit,Eff_Bleeding,3000,2; ',NULL,NULL);
+REPLACE INTO `item_db` VALUES (4404,'Skogul_Card','Skogul Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,' bonus3 bAddEffWhenHit,Eff_Bleeding,3000,ATF_TARGET|ATF_SELF; ',NULL,NULL);
REPLACE INTO `item_db` VALUES (4405,'Frus_Card','Frus Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,' bonus bMagicDamageReturn,getrefine()*2; if(BaseClass==Job_Mage) bonus bMdef,3; ',NULL,NULL);
REPLACE INTO `item_db` VALUES (4406,'Skeggiold_Card','Skeggiold Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,' bonus2 bMagicAddRace,RC_Demon,2; ',NULL,NULL);
REPLACE INTO `item_db` VALUES (4407,'Randgris_Card','Randgris Card',6,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,' bonus bUnbreakableWeapon,0; bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; bonus2 bAddRace2,5,10; bonus3 bAutoSpell,289,1,10; ',NULL,NULL);
diff --git a/src/map/pc.c b/src/map/pc.c
index c41c70425..dc69041eb 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1288,6 +1288,11 @@ static int pc_bonus_autospell(struct s_autospell *spell, int max, short id, shor
static int pc_bonus_addeff(struct s_addeffect* effect, int max, short id, short rate, short arrow_rate, unsigned char flag)
{
int i;
+ if (!(flag&(ATF_SHORT|ATF_LONG)))
+ flag|=ATF_SHORT|ATF_LONG; //Default range: both
+ if (!(flag&(ATF_TARGET|ATF_SELF)))
+ flag|=ATF_TARGET; //Default target: enemy.
+
for (i = 0; i < max && effect[i].flag; i++) {
if (effect[i].id == id && effect[i].flag == flag)
{
@@ -1970,8 +1975,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
break;
}
pc_bonus_addeff(sd->addeff, ARRAYLENGTH(sd->addeff), type2,
- sd->state.lr_flag!=2?val:0, sd->state.lr_flag==2?val:0,
- ATF_SHORT|ATF_LONG|ATF_TARGET);
+ sd->state.lr_flag!=2?val:0, sd->state.lr_flag==2?val:0, 0);
break;
case SP_ADDEFF2:
if (type2 > SC_MAX) {
@@ -1979,8 +1983,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
break;
}
pc_bonus_addeff(sd->addeff, ARRAYLENGTH(sd->addeff), type2,
- sd->state.lr_flag!=2?val:0, sd->state.lr_flag==2?val:0,
- ATF_SHORT|ATF_LONG|ATF_SELF);
+ sd->state.lr_flag!=2?val:0, sd->state.lr_flag==2?val:0, 0);
break;
case SP_RESEFF:
if (type2 < SC_COMMON_MIN || type2 > SC_COMMON_MAX) {
@@ -2196,8 +2199,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
break;
}
if(sd->state.lr_flag != 2)
- pc_bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), type2, val, 0,
- ATF_SHORT|ATF_LONG|ATF_TARGET);
+ pc_bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), type2, val, 0, 0);
break;
case SP_ADDEFF_WHENHIT_SHORT:
if (type2 > SC_MAX) {
@@ -2205,8 +2207,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
break;
}
if(sd->state.lr_flag != 2)
- pc_bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), type2, val, 0,
- ATF_SHORT|ATF_TARGET);
+ pc_bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), type2, val, 0, ATF_SHORT);
break;
case SP_SKILL_ATK:
if(sd->state.lr_flag == 2)
@@ -2446,8 +2447,7 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
break;
}
pc_bonus_addeff(sd->addeff, ARRAYLENGTH(sd->addeff), type2,
- sd->state.lr_flag!=2?type3:0, sd->state.lr_flag==2?type3:0,
- ATF_SHORT|ATF_LONG|(val?ATF_TARGET:ATF_SELF)|(val==2?ATF_SELF:0));
+ sd->state.lr_flag!=2?type3:0, sd->state.lr_flag==2?type3:0, val);
break;
case SP_ADDEFF_WHENHIT:
@@ -2456,8 +2456,7 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
break;
}
if(sd->state.lr_flag != 2)
- pc_bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), type2, type3, 0,
- ATF_SHORT|ATF_LONG|(val?ATF_TARGET:ATF_SELF)|(val==2?ATF_SELF:0));
+ pc_bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), type2, type3, 0, val);
break;
default: