Added skill_duration mapflag. (#2171)

* Added skill_duration mapflag.
* This mapflag sets a skill unit time limit to n% of original duration.
* Implemented mapflags for Hunter's Traps in GVG, BG, and Novice Guild maps.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
This commit is contained in:
Jittapan Pluemsumran 2018-10-26 19:52:49 +07:00 committed by Aleos
parent 2140722743
commit 84b4f09874
15 changed files with 797 additions and 8 deletions

View File

@ -1060,7 +1060,10 @@
1050: Other Flags:
1051: Other Flags2:
1052: Skill Damage Adjustments:
//1053-1064 free
1053: > [Map] %d%%, %d%%, %d%%, %d%% | Caster:%d
1054: > [Map Skill] Name : Player, Monster, Boss Monster, Other | Caster
1055: Skill Duration Adjustments:
//1056-1064 free
1065: No Exp Penalty: %s | No Zeny Penalty: %s
1066: On
1067: Off

View File

@ -321,6 +321,16 @@ This mapflag can also be used to adjust the damage of one skill by a percentage:
---------------------------------------
*skill_duration skill_name,percentage
Sets skill (trap-type) time limit to n% of original duration.
// Example:
// Makes HT_ANKLESNARE's lifetime in the castle 4x longer than other maps.
prtg_cas01 mapflag skill_duration HT_ANKLESNARE,400
---------------------------------------
==================
| 3. Map Effects |
==================

View File

@ -7121,6 +7121,9 @@ For 'skill_damage' mapflag:
- Setting the flag here will adjust the global (all skills) damage on the map.
- <zone> is the -100 to 100000 damage adjustment value of the skills.
- See 'getmapflag' for the different <type> values.
For 'skill_duration' mapflag:
- <zone> is the skill ID to adjust.
- <type> is the percentage of adjustment from 0 to 100000.
---------------------------------------

View File

@ -0,0 +1,549 @@
//===== rAthena Mapflag ======================================
//= Sets skill time limit on specified map.
//===== Structure ============================================
//= mapname skill_duration skill_name,percentage
//============================================================
//============================================================
// Guild Event Maps
//============================================================
guild_vs1 mapflag skill_duration HT_SKIDTRAP,400
guild_vs1 mapflag skill_duration HT_LANDMINE,400
guild_vs1 mapflag skill_duration HT_ANKLESNARE,400
guild_vs1 mapflag skill_duration HT_SHOCKWAVE,400
guild_vs1 mapflag skill_duration HT_SANDMAN,400
guild_vs1 mapflag skill_duration HT_FLASHER,400
guild_vs1 mapflag skill_duration HT_FREEZINGTRAP,400
guild_vs1 mapflag skill_duration HT_BLASTMINE,400
guild_vs1 mapflag skill_duration HT_CLAYMORETRAP,400
guild_vs1 mapflag skill_duration HT_TALKIEBOX,400
guild_vs2 mapflag skill_duration HT_SKIDTRAP,400
guild_vs2 mapflag skill_duration HT_LANDMINE,400
guild_vs2 mapflag skill_duration HT_ANKLESNARE,400
guild_vs2 mapflag skill_duration HT_SHOCKWAVE,400
guild_vs2 mapflag skill_duration HT_SANDMAN,400
guild_vs2 mapflag skill_duration HT_FLASHER,400
guild_vs2 mapflag skill_duration HT_FREEZINGTRAP,400
guild_vs2 mapflag skill_duration HT_BLASTMINE,400
guild_vs2 mapflag skill_duration HT_CLAYMORETRAP,400
guild_vs2 mapflag skill_duration HT_TALKIEBOX,400
guild_vs3 mapflag skill_duration HT_SKIDTRAP,400
guild_vs3 mapflag skill_duration HT_LANDMINE,400
guild_vs3 mapflag skill_duration HT_ANKLESNARE,400
guild_vs3 mapflag skill_duration HT_SHOCKWAVE,400
guild_vs3 mapflag skill_duration HT_SANDMAN,400
guild_vs3 mapflag skill_duration HT_FLASHER,400
guild_vs3 mapflag skill_duration HT_FREEZINGTRAP,400
guild_vs3 mapflag skill_duration HT_BLASTMINE,400
guild_vs3 mapflag skill_duration HT_CLAYMORETRAP,400
guild_vs3 mapflag skill_duration HT_TALKIEBOX,400
guild_vs4 mapflag skill_duration HT_SKIDTRAP,400
guild_vs4 mapflag skill_duration HT_LANDMINE,400
guild_vs4 mapflag skill_duration HT_ANKLESNARE,400
guild_vs4 mapflag skill_duration HT_SHOCKWAVE,400
guild_vs4 mapflag skill_duration HT_SANDMAN,400
guild_vs4 mapflag skill_duration HT_FLASHER,400
guild_vs4 mapflag skill_duration HT_FREEZINGTRAP,400
guild_vs4 mapflag skill_duration HT_BLASTMINE,400
guild_vs4 mapflag skill_duration HT_CLAYMORETRAP,400
guild_vs4 mapflag skill_duration HT_TALKIEBOX,400
guild_vs5 mapflag skill_duration HT_SKIDTRAP,400
guild_vs5 mapflag skill_duration HT_LANDMINE,400
guild_vs5 mapflag skill_duration HT_ANKLESNARE,400
guild_vs5 mapflag skill_duration HT_SHOCKWAVE,400
guild_vs5 mapflag skill_duration HT_SANDMAN,400
guild_vs5 mapflag skill_duration HT_FLASHER,400
guild_vs5 mapflag skill_duration HT_FREEZINGTRAP,400
guild_vs5 mapflag skill_duration HT_BLASTMINE,400
guild_vs5 mapflag skill_duration HT_CLAYMORETRAP,400
guild_vs5 mapflag skill_duration HT_TALKIEBOX,400
//============================================================
// Luina Castles
//============================================================
aldeg_cas01 mapflag skill_duration HT_SKIDTRAP,400
aldeg_cas01 mapflag skill_duration HT_LANDMINE,400
aldeg_cas01 mapflag skill_duration HT_ANKLESNARE,400
aldeg_cas01 mapflag skill_duration HT_SHOCKWAVE,400
aldeg_cas01 mapflag skill_duration HT_SANDMAN,400
aldeg_cas01 mapflag skill_duration HT_FLASHER,400
aldeg_cas01 mapflag skill_duration HT_FREEZINGTRAP,400
aldeg_cas01 mapflag skill_duration HT_BLASTMINE,400
aldeg_cas01 mapflag skill_duration HT_CLAYMORETRAP,400
aldeg_cas01 mapflag skill_duration HT_TALKIEBOX,400
aldeg_cas02 mapflag skill_duration HT_SKIDTRAP,400
aldeg_cas02 mapflag skill_duration HT_LANDMINE,400
aldeg_cas02 mapflag skill_duration HT_ANKLESNARE,400
aldeg_cas02 mapflag skill_duration HT_SHOCKWAVE,400
aldeg_cas02 mapflag skill_duration HT_SANDMAN,400
aldeg_cas02 mapflag skill_duration HT_FLASHER,400
aldeg_cas02 mapflag skill_duration HT_FREEZINGTRAP,400
aldeg_cas02 mapflag skill_duration HT_BLASTMINE,400
aldeg_cas02 mapflag skill_duration HT_CLAYMORETRAP,400
aldeg_cas02 mapflag skill_duration HT_TALKIEBOX,400
aldeg_cas03 mapflag skill_duration HT_SKIDTRAP,400
aldeg_cas03 mapflag skill_duration HT_LANDMINE,400
aldeg_cas03 mapflag skill_duration HT_ANKLESNARE,400
aldeg_cas03 mapflag skill_duration HT_SHOCKWAVE,400
aldeg_cas03 mapflag skill_duration HT_SANDMAN,400
aldeg_cas03 mapflag skill_duration HT_FLASHER,400
aldeg_cas03 mapflag skill_duration HT_FREEZINGTRAP,400
aldeg_cas03 mapflag skill_duration HT_BLASTMINE,400
aldeg_cas03 mapflag skill_duration HT_CLAYMORETRAP,400
aldeg_cas03 mapflag skill_duration HT_TALKIEBOX,400
aldeg_cas04 mapflag skill_duration HT_SKIDTRAP,400
aldeg_cas04 mapflag skill_duration HT_LANDMINE,400
aldeg_cas04 mapflag skill_duration HT_ANKLESNARE,400
aldeg_cas04 mapflag skill_duration HT_SHOCKWAVE,400
aldeg_cas04 mapflag skill_duration HT_SANDMAN,400
aldeg_cas04 mapflag skill_duration HT_FLASHER,400
aldeg_cas04 mapflag skill_duration HT_FREEZINGTRAP,400
aldeg_cas04 mapflag skill_duration HT_BLASTMINE,400
aldeg_cas04 mapflag skill_duration HT_CLAYMORETRAP,400
aldeg_cas04 mapflag skill_duration HT_TALKIEBOX,400
aldeg_cas05 mapflag skill_duration HT_SKIDTRAP,400
aldeg_cas05 mapflag skill_duration HT_LANDMINE,400
aldeg_cas05 mapflag skill_duration HT_ANKLESNARE,400
aldeg_cas05 mapflag skill_duration HT_SHOCKWAVE,400
aldeg_cas05 mapflag skill_duration HT_SANDMAN,400
aldeg_cas05 mapflag skill_duration HT_FLASHER,400
aldeg_cas05 mapflag skill_duration HT_FREEZINGTRAP,400
aldeg_cas05 mapflag skill_duration HT_BLASTMINE,400
aldeg_cas05 mapflag skill_duration HT_CLAYMORETRAP,400
aldeg_cas05 mapflag skill_duration HT_TALKIEBOX,400
//============================================================
// Britoniah Castles
//============================================================
gefg_cas01 mapflag skill_duration HT_SKIDTRAP,400
gefg_cas01 mapflag skill_duration HT_LANDMINE,400
gefg_cas01 mapflag skill_duration HT_ANKLESNARE,400
gefg_cas01 mapflag skill_duration HT_SHOCKWAVE,400
gefg_cas01 mapflag skill_duration HT_SANDMAN,400
gefg_cas01 mapflag skill_duration HT_FLASHER,400
gefg_cas01 mapflag skill_duration HT_FREEZINGTRAP,400
gefg_cas01 mapflag skill_duration HT_BLASTMINE,400
gefg_cas01 mapflag skill_duration HT_CLAYMORETRAP,400
gefg_cas01 mapflag skill_duration HT_TALKIEBOX,400
gefg_cas02 mapflag skill_duration HT_SKIDTRAP,400
gefg_cas02 mapflag skill_duration HT_LANDMINE,400
gefg_cas02 mapflag skill_duration HT_ANKLESNARE,400
gefg_cas02 mapflag skill_duration HT_SHOCKWAVE,400
gefg_cas02 mapflag skill_duration HT_SANDMAN,400
gefg_cas02 mapflag skill_duration HT_FLASHER,400
gefg_cas02 mapflag skill_duration HT_FREEZINGTRAP,400
gefg_cas02 mapflag skill_duration HT_BLASTMINE,400
gefg_cas02 mapflag skill_duration HT_CLAYMORETRAP,400
gefg_cas02 mapflag skill_duration HT_TALKIEBOX,400
gefg_cas03 mapflag skill_duration HT_SKIDTRAP,400
gefg_cas03 mapflag skill_duration HT_LANDMINE,400
gefg_cas03 mapflag skill_duration HT_ANKLESNARE,400
gefg_cas03 mapflag skill_duration HT_SHOCKWAVE,400
gefg_cas03 mapflag skill_duration HT_SANDMAN,400
gefg_cas03 mapflag skill_duration HT_FLASHER,400
gefg_cas03 mapflag skill_duration HT_FREEZINGTRAP,400
gefg_cas03 mapflag skill_duration HT_BLASTMINE,400
gefg_cas03 mapflag skill_duration HT_CLAYMORETRAP,400
gefg_cas03 mapflag skill_duration HT_TALKIEBOX,400
gefg_cas04 mapflag skill_duration HT_SKIDTRAP,400
gefg_cas04 mapflag skill_duration HT_LANDMINE,400
gefg_cas04 mapflag skill_duration HT_ANKLESNARE,400
gefg_cas04 mapflag skill_duration HT_SHOCKWAVE,400
gefg_cas04 mapflag skill_duration HT_SANDMAN,400
gefg_cas04 mapflag skill_duration HT_FLASHER,400
gefg_cas04 mapflag skill_duration HT_FREEZINGTRAP,400
gefg_cas04 mapflag skill_duration HT_BLASTMINE,400
gefg_cas04 mapflag skill_duration HT_CLAYMORETRAP,400
gefg_cas04 mapflag skill_duration HT_TALKIEBOX,400
gefg_cas05 mapflag skill_duration HT_SKIDTRAP,400
gefg_cas05 mapflag skill_duration HT_LANDMINE,400
gefg_cas05 mapflag skill_duration HT_ANKLESNARE,400
gefg_cas05 mapflag skill_duration HT_SHOCKWAVE,400
gefg_cas05 mapflag skill_duration HT_SANDMAN,400
gefg_cas05 mapflag skill_duration HT_FLASHER,400
gefg_cas05 mapflag skill_duration HT_FREEZINGTRAP,400
gefg_cas05 mapflag skill_duration HT_BLASTMINE,400
gefg_cas05 mapflag skill_duration HT_CLAYMORETRAP,400
gefg_cas05 mapflag skill_duration HT_TALKIEBOX,400
//============================================================
// Greenwood Castles
//============================================================
payg_cas01 mapflag skill_duration HT_SKIDTRAP,400
payg_cas01 mapflag skill_duration HT_LANDMINE,400
payg_cas01 mapflag skill_duration HT_ANKLESNARE,400
payg_cas01 mapflag skill_duration HT_SHOCKWAVE,400
payg_cas01 mapflag skill_duration HT_SANDMAN,400
payg_cas01 mapflag skill_duration HT_FLASHER,400
payg_cas01 mapflag skill_duration HT_FREEZINGTRAP,400
payg_cas01 mapflag skill_duration HT_BLASTMINE,400
payg_cas01 mapflag skill_duration HT_CLAYMORETRAP,400
payg_cas01 mapflag skill_duration HT_TALKIEBOX,400
payg_cas02 mapflag skill_duration HT_SKIDTRAP,400
payg_cas02 mapflag skill_duration HT_LANDMINE,400
payg_cas02 mapflag skill_duration HT_ANKLESNARE,400
payg_cas02 mapflag skill_duration HT_SHOCKWAVE,400
payg_cas02 mapflag skill_duration HT_SANDMAN,400
payg_cas02 mapflag skill_duration HT_FLASHER,400
payg_cas02 mapflag skill_duration HT_FREEZINGTRAP,400
payg_cas02 mapflag skill_duration HT_BLASTMINE,400
payg_cas02 mapflag skill_duration HT_CLAYMORETRAP,400
payg_cas02 mapflag skill_duration HT_TALKIEBOX,400
payg_cas03 mapflag skill_duration HT_SKIDTRAP,400
payg_cas03 mapflag skill_duration HT_LANDMINE,400
payg_cas03 mapflag skill_duration HT_ANKLESNARE,400
payg_cas03 mapflag skill_duration HT_SHOCKWAVE,400
payg_cas03 mapflag skill_duration HT_SANDMAN,400
payg_cas03 mapflag skill_duration HT_FLASHER,400
payg_cas03 mapflag skill_duration HT_FREEZINGTRAP,400
payg_cas03 mapflag skill_duration HT_BLASTMINE,400
payg_cas03 mapflag skill_duration HT_CLAYMORETRAP,400
payg_cas03 mapflag skill_duration HT_TALKIEBOX,400
payg_cas04 mapflag skill_duration HT_SKIDTRAP,400
payg_cas04 mapflag skill_duration HT_LANDMINE,400
payg_cas04 mapflag skill_duration HT_ANKLESNARE,400
payg_cas04 mapflag skill_duration HT_SHOCKWAVE,400
payg_cas04 mapflag skill_duration HT_SANDMAN,400
payg_cas04 mapflag skill_duration HT_FLASHER,400
payg_cas04 mapflag skill_duration HT_FREEZINGTRAP,400
payg_cas04 mapflag skill_duration HT_BLASTMINE,400
payg_cas04 mapflag skill_duration HT_CLAYMORETRAP,400
payg_cas04 mapflag skill_duration HT_TALKIEBOX,400
payg_cas05 mapflag skill_duration HT_SKIDTRAP,400
payg_cas05 mapflag skill_duration HT_LANDMINE,400
payg_cas05 mapflag skill_duration HT_ANKLESNARE,400
payg_cas05 mapflag skill_duration HT_SHOCKWAVE,400
payg_cas05 mapflag skill_duration HT_SANDMAN,400
payg_cas05 mapflag skill_duration HT_FLASHER,400
payg_cas05 mapflag skill_duration HT_FREEZINGTRAP,400
payg_cas05 mapflag skill_duration HT_BLASTMINE,400
payg_cas05 mapflag skill_duration HT_CLAYMORETRAP,400
payg_cas05 mapflag skill_duration HT_TALKIEBOX,400
//============================================================
// Valkyrie Castles
//============================================================
prtg_cas01 mapflag skill_duration HT_SKIDTRAP,400
prtg_cas01 mapflag skill_duration HT_LANDMINE,400
prtg_cas01 mapflag skill_duration HT_ANKLESNARE,400
prtg_cas01 mapflag skill_duration HT_SHOCKWAVE,400
prtg_cas01 mapflag skill_duration HT_SANDMAN,400
prtg_cas01 mapflag skill_duration HT_FLASHER,400
prtg_cas01 mapflag skill_duration HT_FREEZINGTRAP,400
prtg_cas01 mapflag skill_duration HT_BLASTMINE,400
prtg_cas01 mapflag skill_duration HT_CLAYMORETRAP,400
prtg_cas01 mapflag skill_duration HT_TALKIEBOX,400
prtg_cas02 mapflag skill_duration HT_SKIDTRAP,400
prtg_cas02 mapflag skill_duration HT_LANDMINE,400
prtg_cas02 mapflag skill_duration HT_ANKLESNARE,400
prtg_cas02 mapflag skill_duration HT_SHOCKWAVE,400
prtg_cas02 mapflag skill_duration HT_SANDMAN,400
prtg_cas02 mapflag skill_duration HT_FLASHER,400
prtg_cas02 mapflag skill_duration HT_FREEZINGTRAP,400
prtg_cas02 mapflag skill_duration HT_BLASTMINE,400
prtg_cas02 mapflag skill_duration HT_CLAYMORETRAP,400
prtg_cas02 mapflag skill_duration HT_TALKIEBOX,400
prtg_cas03 mapflag skill_duration HT_SKIDTRAP,400
prtg_cas03 mapflag skill_duration HT_LANDMINE,400
prtg_cas03 mapflag skill_duration HT_ANKLESNARE,400
prtg_cas03 mapflag skill_duration HT_SHOCKWAVE,400
prtg_cas03 mapflag skill_duration HT_SANDMAN,400
prtg_cas03 mapflag skill_duration HT_FLASHER,400
prtg_cas03 mapflag skill_duration HT_FREEZINGTRAP,400
prtg_cas03 mapflag skill_duration HT_BLASTMINE,400
prtg_cas03 mapflag skill_duration HT_CLAYMORETRAP,400
prtg_cas03 mapflag skill_duration HT_TALKIEBOX,400
prtg_cas04 mapflag skill_duration HT_SKIDTRAP,400
prtg_cas04 mapflag skill_duration HT_LANDMINE,400
prtg_cas04 mapflag skill_duration HT_ANKLESNARE,400
prtg_cas04 mapflag skill_duration HT_SHOCKWAVE,400
prtg_cas04 mapflag skill_duration HT_SANDMAN,400
prtg_cas04 mapflag skill_duration HT_FLASHER,400
prtg_cas04 mapflag skill_duration HT_FREEZINGTRAP,400
prtg_cas04 mapflag skill_duration HT_BLASTMINE,400
prtg_cas04 mapflag skill_duration HT_CLAYMORETRAP,400
prtg_cas04 mapflag skill_duration HT_TALKIEBOX,400
prtg_cas05 mapflag skill_duration HT_SKIDTRAP,400
prtg_cas05 mapflag skill_duration HT_LANDMINE,400
prtg_cas05 mapflag skill_duration HT_ANKLESNARE,400
prtg_cas05 mapflag skill_duration HT_SHOCKWAVE,400
prtg_cas05 mapflag skill_duration HT_SANDMAN,400
prtg_cas05 mapflag skill_duration HT_FLASHER,400
prtg_cas05 mapflag skill_duration HT_FREEZINGTRAP,400
prtg_cas05 mapflag skill_duration HT_BLASTMINE,400
prtg_cas05 mapflag skill_duration HT_CLAYMORETRAP,400
prtg_cas05 mapflag skill_duration HT_TALKIEBOX,400
//============================================================
// Schwarzwald Castles
//============================================================
schg_cas01 mapflag skill_duration HT_SKIDTRAP,400
schg_cas01 mapflag skill_duration HT_LANDMINE,400
schg_cas01 mapflag skill_duration HT_ANKLESNARE,400
schg_cas01 mapflag skill_duration HT_SHOCKWAVE,400
schg_cas01 mapflag skill_duration HT_SANDMAN,400
schg_cas01 mapflag skill_duration HT_FLASHER,400
schg_cas01 mapflag skill_duration HT_FREEZINGTRAP,400
schg_cas01 mapflag skill_duration HT_BLASTMINE,400
schg_cas01 mapflag skill_duration HT_CLAYMORETRAP,400
schg_cas01 mapflag skill_duration HT_TALKIEBOX,400
schg_cas02 mapflag skill_duration HT_SKIDTRAP,400
schg_cas02 mapflag skill_duration HT_LANDMINE,400
schg_cas02 mapflag skill_duration HT_ANKLESNARE,400
schg_cas02 mapflag skill_duration HT_SHOCKWAVE,400
schg_cas02 mapflag skill_duration HT_SANDMAN,400
schg_cas02 mapflag skill_duration HT_FLASHER,400
schg_cas02 mapflag skill_duration HT_FREEZINGTRAP,400
schg_cas02 mapflag skill_duration HT_BLASTMINE,400
schg_cas02 mapflag skill_duration HT_CLAYMORETRAP,400
schg_cas02 mapflag skill_duration HT_TALKIEBOX,400
schg_cas03 mapflag skill_duration HT_SKIDTRAP,400
schg_cas03 mapflag skill_duration HT_LANDMINE,400
schg_cas03 mapflag skill_duration HT_ANKLESNARE,400
schg_cas03 mapflag skill_duration HT_SHOCKWAVE,400
schg_cas03 mapflag skill_duration HT_SANDMAN,400
schg_cas03 mapflag skill_duration HT_FLASHER,400
schg_cas03 mapflag skill_duration HT_FREEZINGTRAP,400
schg_cas03 mapflag skill_duration HT_BLASTMINE,400
schg_cas03 mapflag skill_duration HT_CLAYMORETRAP,400
schg_cas03 mapflag skill_duration HT_TALKIEBOX,400
schg_cas04 mapflag skill_duration HT_SKIDTRAP,400
schg_cas04 mapflag skill_duration HT_LANDMINE,400
schg_cas04 mapflag skill_duration HT_ANKLESNARE,400
schg_cas04 mapflag skill_duration HT_SHOCKWAVE,400
schg_cas04 mapflag skill_duration HT_SANDMAN,400
schg_cas04 mapflag skill_duration HT_FLASHER,400
schg_cas04 mapflag skill_duration HT_FREEZINGTRAP,400
schg_cas04 mapflag skill_duration HT_BLASTMINE,400
schg_cas04 mapflag skill_duration HT_CLAYMORETRAP,400
schg_cas04 mapflag skill_duration HT_TALKIEBOX,400
schg_cas05 mapflag skill_duration HT_SKIDTRAP,400
schg_cas05 mapflag skill_duration HT_LANDMINE,400
schg_cas05 mapflag skill_duration HT_ANKLESNARE,400
schg_cas05 mapflag skill_duration HT_SHOCKWAVE,400
schg_cas05 mapflag skill_duration HT_SANDMAN,400
schg_cas05 mapflag skill_duration HT_FLASHER,400
schg_cas05 mapflag skill_duration HT_FREEZINGTRAP,400
schg_cas05 mapflag skill_duration HT_BLASTMINE,400
schg_cas05 mapflag skill_duration HT_CLAYMORETRAP,400
schg_cas05 mapflag skill_duration HT_TALKIEBOX,400
//============================================================
// Arunafeltz Castles
//============================================================
arug_cas01 mapflag skill_duration HT_SKIDTRAP,400
arug_cas01 mapflag skill_duration HT_LANDMINE,400
arug_cas01 mapflag skill_duration HT_ANKLESNARE,400
arug_cas01 mapflag skill_duration HT_SHOCKWAVE,400
arug_cas01 mapflag skill_duration HT_SANDMAN,400
arug_cas01 mapflag skill_duration HT_FLASHER,400
arug_cas01 mapflag skill_duration HT_FREEZINGTRAP,400
arug_cas01 mapflag skill_duration HT_BLASTMINE,400
arug_cas01 mapflag skill_duration HT_CLAYMORETRAP,400
arug_cas01 mapflag skill_duration HT_TALKIEBOX,400
arug_cas02 mapflag skill_duration HT_SKIDTRAP,400
arug_cas02 mapflag skill_duration HT_LANDMINE,400
arug_cas02 mapflag skill_duration HT_ANKLESNARE,400
arug_cas02 mapflag skill_duration HT_SHOCKWAVE,400
arug_cas02 mapflag skill_duration HT_SANDMAN,400
arug_cas02 mapflag skill_duration HT_FLASHER,400
arug_cas02 mapflag skill_duration HT_FREEZINGTRAP,400
arug_cas02 mapflag skill_duration HT_BLASTMINE,400
arug_cas02 mapflag skill_duration HT_CLAYMORETRAP,400
arug_cas02 mapflag skill_duration HT_TALKIEBOX,400
arug_cas03 mapflag skill_duration HT_SKIDTRAP,400
arug_cas03 mapflag skill_duration HT_LANDMINE,400
arug_cas03 mapflag skill_duration HT_ANKLESNARE,400
arug_cas03 mapflag skill_duration HT_SHOCKWAVE,400
arug_cas03 mapflag skill_duration HT_SANDMAN,400
arug_cas03 mapflag skill_duration HT_FLASHER,400
arug_cas03 mapflag skill_duration HT_FREEZINGTRAP,400
arug_cas03 mapflag skill_duration HT_BLASTMINE,400
arug_cas03 mapflag skill_duration HT_CLAYMORETRAP,400
arug_cas03 mapflag skill_duration HT_TALKIEBOX,400
arug_cas04 mapflag skill_duration HT_SKIDTRAP,400
arug_cas04 mapflag skill_duration HT_LANDMINE,400
arug_cas04 mapflag skill_duration HT_ANKLESNARE,400
arug_cas04 mapflag skill_duration HT_SHOCKWAVE,400
arug_cas04 mapflag skill_duration HT_SANDMAN,400
arug_cas04 mapflag skill_duration HT_FLASHER,400
arug_cas04 mapflag skill_duration HT_FREEZINGTRAP,400
arug_cas04 mapflag skill_duration HT_BLASTMINE,400
arug_cas04 mapflag skill_duration HT_CLAYMORETRAP,400
arug_cas04 mapflag skill_duration HT_TALKIEBOX,400
arug_cas05 mapflag skill_duration HT_SKIDTRAP,400
arug_cas05 mapflag skill_duration HT_LANDMINE,400
arug_cas05 mapflag skill_duration HT_ANKLESNARE,400
arug_cas05 mapflag skill_duration HT_SHOCKWAVE,400
arug_cas05 mapflag skill_duration HT_SANDMAN,400
arug_cas05 mapflag skill_duration HT_FLASHER,400
arug_cas05 mapflag skill_duration HT_FREEZINGTRAP,400
arug_cas05 mapflag skill_duration HT_BLASTMINE,400
arug_cas05 mapflag skill_duration HT_CLAYMORETRAP,400
arug_cas05 mapflag skill_duration HT_TALKIEBOX,400
//============================================================
// Novice Guild Castles
//============================================================
n_castle mapflag skill_duration HT_SKIDTRAP,400
n_castle mapflag skill_duration HT_LANDMINE,400
n_castle mapflag skill_duration HT_ANKLESNARE,400
n_castle mapflag skill_duration HT_SHOCKWAVE,400
n_castle mapflag skill_duration HT_SANDMAN,400
n_castle mapflag skill_duration HT_FLASHER,400
n_castle mapflag skill_duration HT_FREEZINGTRAP,400
n_castle mapflag skill_duration HT_BLASTMINE,400
n_castle mapflag skill_duration HT_CLAYMORETRAP,400
n_castle mapflag skill_duration HT_TALKIEBOX,400
nguild_alde mapflag skill_duration HT_SKIDTRAP,400
nguild_alde mapflag skill_duration HT_LANDMINE,400
nguild_alde mapflag skill_duration HT_ANKLESNARE,400
nguild_alde mapflag skill_duration HT_SHOCKWAVE,400
nguild_alde mapflag skill_duration HT_SANDMAN,400
nguild_alde mapflag skill_duration HT_FLASHER,400
nguild_alde mapflag skill_duration HT_FREEZINGTRAP,400
nguild_alde mapflag skill_duration HT_BLASTMINE,400
nguild_alde mapflag skill_duration HT_CLAYMORETRAP,400
nguild_alde mapflag skill_duration HT_TALKIEBOX,400
nguild_gef mapflag skill_duration HT_SKIDTRAP,400
nguild_gef mapflag skill_duration HT_LANDMINE,400
nguild_gef mapflag skill_duration HT_ANKLESNARE,400
nguild_gef mapflag skill_duration HT_SHOCKWAVE,400
nguild_gef mapflag skill_duration HT_SANDMAN,400
nguild_gef mapflag skill_duration HT_FLASHER,400
nguild_gef mapflag skill_duration HT_FREEZINGTRAP,400
nguild_gef mapflag skill_duration HT_BLASTMINE,400
nguild_gef mapflag skill_duration HT_CLAYMORETRAP,400
nguild_gef mapflag skill_duration HT_TALKIEBOX,400
nguild_pay mapflag skill_duration HT_SKIDTRAP,400
nguild_pay mapflag skill_duration HT_LANDMINE,400
nguild_pay mapflag skill_duration HT_ANKLESNARE,400
nguild_pay mapflag skill_duration HT_SHOCKWAVE,400
nguild_pay mapflag skill_duration HT_SANDMAN,400
nguild_pay mapflag skill_duration HT_FLASHER,400
nguild_pay mapflag skill_duration HT_FREEZINGTRAP,400
nguild_pay mapflag skill_duration HT_BLASTMINE,400
nguild_pay mapflag skill_duration HT_CLAYMORETRAP,400
nguild_pay mapflag skill_duration HT_TALKIEBOX,400
nguild_prt mapflag skill_duration HT_SKIDTRAP,400
nguild_prt mapflag skill_duration HT_LANDMINE,400
nguild_prt mapflag skill_duration HT_ANKLESNARE,400
nguild_prt mapflag skill_duration HT_SHOCKWAVE,400
nguild_prt mapflag skill_duration HT_SANDMAN,400
nguild_prt mapflag skill_duration HT_FLASHER,400
nguild_prt mapflag skill_duration HT_FREEZINGTRAP,400
nguild_prt mapflag skill_duration HT_BLASTMINE,400
nguild_prt mapflag skill_duration HT_CLAYMORETRAP,400
nguild_prt mapflag skill_duration HT_TALKIEBOX,400
//============================================================
// Battlegrounds
//============================================================
bat_a01 mapflag skill_duration HT_SKIDTRAP,400
bat_a01 mapflag skill_duration HT_LANDMINE,400
bat_a01 mapflag skill_duration HT_ANKLESNARE,400
bat_a01 mapflag skill_duration HT_SHOCKWAVE,400
bat_a01 mapflag skill_duration HT_SANDMAN,400
bat_a01 mapflag skill_duration HT_FLASHER,400
bat_a01 mapflag skill_duration HT_FREEZINGTRAP,400
bat_a01 mapflag skill_duration HT_BLASTMINE,400
bat_a01 mapflag skill_duration HT_CLAYMORETRAP,400
bat_a01 mapflag skill_duration HT_TALKIEBOX,400
bat_a02 mapflag skill_duration HT_SKIDTRAP,400
bat_a02 mapflag skill_duration HT_LANDMINE,400
bat_a02 mapflag skill_duration HT_ANKLESNARE,400
bat_a02 mapflag skill_duration HT_SHOCKWAVE,400
bat_a02 mapflag skill_duration HT_SANDMAN,400
bat_a02 mapflag skill_duration HT_FLASHER,400
bat_a02 mapflag skill_duration HT_FREEZINGTRAP,400
bat_a02 mapflag skill_duration HT_BLASTMINE,400
bat_a02 mapflag skill_duration HT_CLAYMORETRAP,400
bat_a02 mapflag skill_duration HT_TALKIEBOX,400
bat_b01 mapflag skill_duration HT_SKIDTRAP,400
bat_b01 mapflag skill_duration HT_LANDMINE,400
bat_b01 mapflag skill_duration HT_ANKLESNARE,400
bat_b01 mapflag skill_duration HT_SHOCKWAVE,400
bat_b01 mapflag skill_duration HT_SANDMAN,400
bat_b01 mapflag skill_duration HT_FLASHER,400
bat_b01 mapflag skill_duration HT_FREEZINGTRAP,400
bat_b01 mapflag skill_duration HT_BLASTMINE,400
bat_b01 mapflag skill_duration HT_CLAYMORETRAP,400
bat_b01 mapflag skill_duration HT_TALKIEBOX,400
bat_b02 mapflag skill_duration HT_SKIDTRAP,400
bat_b02 mapflag skill_duration HT_LANDMINE,400
bat_b02 mapflag skill_duration HT_ANKLESNARE,400
bat_b02 mapflag skill_duration HT_SHOCKWAVE,400
bat_b02 mapflag skill_duration HT_SANDMAN,400
bat_b02 mapflag skill_duration HT_FLASHER,400
bat_b02 mapflag skill_duration HT_FREEZINGTRAP,400
bat_b02 mapflag skill_duration HT_BLASTMINE,400
bat_b02 mapflag skill_duration HT_CLAYMORETRAP,400
bat_b02 mapflag skill_duration HT_TALKIEBOX,400
bat_c01 mapflag skill_duration HT_SKIDTRAP,400
bat_c01 mapflag skill_duration HT_LANDMINE,400
bat_c01 mapflag skill_duration HT_ANKLESNARE,400
bat_c01 mapflag skill_duration HT_SHOCKWAVE,400
bat_c01 mapflag skill_duration HT_SANDMAN,400
bat_c01 mapflag skill_duration HT_FLASHER,400
bat_c01 mapflag skill_duration HT_FREEZINGTRAP,400
bat_c01 mapflag skill_duration HT_BLASTMINE,400
bat_c01 mapflag skill_duration HT_CLAYMORETRAP,400
bat_c01 mapflag skill_duration HT_TALKIEBOX,400
bat_c02 mapflag skill_duration HT_SKIDTRAP,400
bat_c02 mapflag skill_duration HT_LANDMINE,400
bat_c02 mapflag skill_duration HT_ANKLESNARE,400
bat_c02 mapflag skill_duration HT_SHOCKWAVE,400
bat_c02 mapflag skill_duration HT_SANDMAN,400
bat_c02 mapflag skill_duration HT_FLASHER,400
bat_c02 mapflag skill_duration HT_FREEZINGTRAP,400
bat_c02 mapflag skill_duration HT_BLASTMINE,400
bat_c02 mapflag skill_duration HT_CLAYMORETRAP,400
bat_c02 mapflag skill_duration HT_TALKIEBOX,400
bat_c03 mapflag skill_duration HT_SKIDTRAP,400
bat_c03 mapflag skill_duration HT_LANDMINE,400
bat_c03 mapflag skill_duration HT_ANKLESNARE,400
bat_c03 mapflag skill_duration HT_SHOCKWAVE,400
bat_c03 mapflag skill_duration HT_SANDMAN,400
bat_c03 mapflag skill_duration HT_FLASHER,400
bat_c03 mapflag skill_duration HT_FREEZINGTRAP,400
bat_c03 mapflag skill_duration HT_BLASTMINE,400
bat_c03 mapflag skill_duration HT_CLAYMORETRAP,400
bat_c03 mapflag skill_duration HT_TALKIEBOX,400

View File

@ -0,0 +1,121 @@
//===== rAthena Mapflag ======================================
//= Sets skill time limit on specified map.
//===== Structure ============================================
//= mapname skill_duration skill_name,percentage
//============================================================
//============================================================
// Gloria Castles
//============================================================
te_prtcas01 mapflag skill_duration HT_SKIDTRAP,400
te_prtcas01 mapflag skill_duration HT_LANDMINE,400
te_prtcas01 mapflag skill_duration HT_ANKLESNARE,400
te_prtcas01 mapflag skill_duration HT_SHOCKWAVE,400
te_prtcas01 mapflag skill_duration HT_SANDMAN,400
te_prtcas01 mapflag skill_duration HT_FLASHER,400
te_prtcas01 mapflag skill_duration HT_FREEZINGTRAP,400
te_prtcas01 mapflag skill_duration HT_BLASTMINE,400
te_prtcas01 mapflag skill_duration HT_CLAYMORETRAP,400
te_prtcas01 mapflag skill_duration HT_TALKIEBOX,400
te_prtcas02 mapflag skill_duration HT_SKIDTRAP,400
te_prtcas02 mapflag skill_duration HT_LANDMINE,400
te_prtcas02 mapflag skill_duration HT_ANKLESNARE,400
te_prtcas02 mapflag skill_duration HT_SHOCKWAVE,400
te_prtcas02 mapflag skill_duration HT_SANDMAN,400
te_prtcas02 mapflag skill_duration HT_FLASHER,400
te_prtcas02 mapflag skill_duration HT_FREEZINGTRAP,400
te_prtcas02 mapflag skill_duration HT_BLASTMINE,400
te_prtcas02 mapflag skill_duration HT_CLAYMORETRAP,400
te_prtcas02 mapflag skill_duration HT_TALKIEBOX,400
te_prtcas03 mapflag skill_duration HT_SKIDTRAP,400
te_prtcas03 mapflag skill_duration HT_LANDMINE,400
te_prtcas03 mapflag skill_duration HT_ANKLESNARE,400
te_prtcas03 mapflag skill_duration HT_SHOCKWAVE,400
te_prtcas03 mapflag skill_duration HT_SANDMAN,400
te_prtcas03 mapflag skill_duration HT_FLASHER,400
te_prtcas03 mapflag skill_duration HT_FREEZINGTRAP,400
te_prtcas03 mapflag skill_duration HT_BLASTMINE,400
te_prtcas03 mapflag skill_duration HT_CLAYMORETRAP,400
te_prtcas03 mapflag skill_duration HT_TALKIEBOX,400
te_prtcas04 mapflag skill_duration HT_SKIDTRAP,400
te_prtcas04 mapflag skill_duration HT_LANDMINE,400
te_prtcas04 mapflag skill_duration HT_ANKLESNARE,400
te_prtcas04 mapflag skill_duration HT_SHOCKWAVE,400
te_prtcas04 mapflag skill_duration HT_SANDMAN,400
te_prtcas04 mapflag skill_duration HT_FLASHER,400
te_prtcas04 mapflag skill_duration HT_FREEZINGTRAP,400
te_prtcas04 mapflag skill_duration HT_BLASTMINE,400
te_prtcas04 mapflag skill_duration HT_CLAYMORETRAP,400
te_prtcas04 mapflag skill_duration HT_TALKIEBOX,400
te_prtcas05 mapflag skill_duration HT_SKIDTRAP,400
te_prtcas05 mapflag skill_duration HT_LANDMINE,400
te_prtcas05 mapflag skill_duration HT_ANKLESNARE,400
te_prtcas05 mapflag skill_duration HT_SHOCKWAVE,400
te_prtcas05 mapflag skill_duration HT_SANDMAN,400
te_prtcas05 mapflag skill_duration HT_FLASHER,400
te_prtcas05 mapflag skill_duration HT_FREEZINGTRAP,400
te_prtcas05 mapflag skill_duration HT_BLASTMINE,400
te_prtcas05 mapflag skill_duration HT_CLAYMORETRAP,400
te_prtcas05 mapflag skill_duration HT_TALKIEBOX,400
//============================================================
// Kafragaten Castles
//============================================================
te_aldecas1 mapflag skill_duration HT_SKIDTRAP,400
te_aldecas1 mapflag skill_duration HT_LANDMINE,400
te_aldecas1 mapflag skill_duration HT_ANKLESNARE,400
te_aldecas1 mapflag skill_duration HT_SHOCKWAVE,400
te_aldecas1 mapflag skill_duration HT_SANDMAN,400
te_aldecas1 mapflag skill_duration HT_FLASHER,400
te_aldecas1 mapflag skill_duration HT_FREEZINGTRAP,400
te_aldecas1 mapflag skill_duration HT_BLASTMINE,400
te_aldecas1 mapflag skill_duration HT_CLAYMORETRAP,400
te_aldecas1 mapflag skill_duration HT_TALKIEBOX,400
te_aldecas2 mapflag skill_duration HT_SKIDTRAP,400
te_aldecas2 mapflag skill_duration HT_LANDMINE,400
te_aldecas2 mapflag skill_duration HT_ANKLESNARE,400
te_aldecas2 mapflag skill_duration HT_SHOCKWAVE,400
te_aldecas2 mapflag skill_duration HT_SANDMAN,400
te_aldecas2 mapflag skill_duration HT_FLASHER,400
te_aldecas2 mapflag skill_duration HT_FREEZINGTRAP,400
te_aldecas2 mapflag skill_duration HT_BLASTMINE,400
te_aldecas2 mapflag skill_duration HT_CLAYMORETRAP,400
te_aldecas2 mapflag skill_duration HT_TALKIEBOX,400
te_aldecas3 mapflag skill_duration HT_SKIDTRAP,400
te_aldecas3 mapflag skill_duration HT_LANDMINE,400
te_aldecas3 mapflag skill_duration HT_ANKLESNARE,400
te_aldecas3 mapflag skill_duration HT_SHOCKWAVE,400
te_aldecas3 mapflag skill_duration HT_SANDMAN,400
te_aldecas3 mapflag skill_duration HT_FLASHER,400
te_aldecas3 mapflag skill_duration HT_FREEZINGTRAP,400
te_aldecas3 mapflag skill_duration HT_BLASTMINE,400
te_aldecas3 mapflag skill_duration HT_CLAYMORETRAP,400
te_aldecas3 mapflag skill_duration HT_TALKIEBOX,400
te_aldecas4 mapflag skill_duration HT_SKIDTRAP,400
te_aldecas4 mapflag skill_duration HT_LANDMINE,400
te_aldecas4 mapflag skill_duration HT_ANKLESNARE,400
te_aldecas4 mapflag skill_duration HT_SHOCKWAVE,400
te_aldecas4 mapflag skill_duration HT_SANDMAN,400
te_aldecas4 mapflag skill_duration HT_FLASHER,400
te_aldecas4 mapflag skill_duration HT_FREEZINGTRAP,400
te_aldecas4 mapflag skill_duration HT_BLASTMINE,400
te_aldecas4 mapflag skill_duration HT_CLAYMORETRAP,400
te_aldecas4 mapflag skill_duration HT_TALKIEBOX,400
te_aldecas5 mapflag skill_duration HT_SKIDTRAP,400
te_aldecas5 mapflag skill_duration HT_LANDMINE,400
te_aldecas5 mapflag skill_duration HT_ANKLESNARE,400
te_aldecas5 mapflag skill_duration HT_SHOCKWAVE,400
te_aldecas5 mapflag skill_duration HT_SANDMAN,400
te_aldecas5 mapflag skill_duration HT_FLASHER,400
te_aldecas5 mapflag skill_duration HT_FREEZINGTRAP,400
te_aldecas5 mapflag skill_duration HT_BLASTMINE,400
te_aldecas5 mapflag skill_duration HT_CLAYMORETRAP,400
te_aldecas5 mapflag skill_duration HT_TALKIEBOX,400

View File

@ -18,3 +18,4 @@ npc: npc/re/mapflag/night.txt
npc: npc/re/mapflag/restricted.txt
npc: npc/re/mapflag/town.txt
npc: npc/re/mapflag/reset.txt
npc: npc/re/mapflag/skill_duration.txt

View File

@ -28,3 +28,4 @@ npc: npc/mapflag/battleground.txt
npc: npc/mapflag/skill_damage.txt
npc: npc/mapflag/town.txt
npc: npc/mapflag/nocostume.txt
npc: npc/mapflag/skill_duration.txt

View File

@ -4043,8 +4043,8 @@ ACMD_FUNC(mapinfo) {
/* Skill damage adjustment info [Cydh] */
if (mapdata->flag[MF_SKILL_DAMAGE]) {
clif_displaymessage(fd,msg_txt(sd,1052)); // Skill Damage Adjustments:
sprintf(atcmd_output," > [Map] %d%%, %d%%, %d%%, %d%% | Caster:%d",
clif_displaymessage(fd,msg_txt(sd,1052)); // Skill Damage Adjustments:
sprintf(atcmd_output, msg_txt(sd, 1053), // > [Map] %d%%, %d%%, %d%%, %d%% | Caster:%d
mapdata->damage_adjust.rate[SKILLDMG_PC],
mapdata->damage_adjust.rate[SKILLDMG_MOB],
mapdata->damage_adjust.rate[SKILLDMG_BOSS],
@ -4052,7 +4052,7 @@ ACMD_FUNC(mapinfo) {
mapdata->damage_adjust.caster);
clif_displaymessage(fd, atcmd_output);
if (!mapdata->skill_damage.empty()) {
clif_displaymessage(fd," > [Map Skill] Name : Player, Monster, Boss Monster, Other | Caster");
clif_displaymessage(fd, msg_txt(sd, 1054)); // > [Map Skill] Name : Player, Monster, Boss Monster, Other | Caster
for (auto skilldmg : mapdata->skill_damage) {
sprintf(atcmd_output," %s : %d%%, %d%%, %d%%, %d%% | %d",
skill_get_name(skilldmg.first),
@ -4066,6 +4066,14 @@ ACMD_FUNC(mapinfo) {
}
}
if (map_getmapflag(m_id, MF_SKILL_DURATION)) {
clif_displaymessage(fd, msg_txt(sd, 1055)); // Skill Duration Adjustments:
for (const auto &it : mapdata->skill_duration) {
sprintf(atcmd_output, " > %s : %d%%", skill_get_name(it.first), it.second);
clif_displaymessage(fd, atcmd_output);
}
}
strcpy(atcmd_output,msg_txt(sd,1046)); // PvP Flags:
if (map_getmapflag(m_id, MF_PVP))
strcat(atcmd_output, " Pvp ON |");
@ -8163,7 +8171,8 @@ ACMD_FUNC(mapflag) {
MF_BEXP,
MF_JEXP,
MF_BATTLEGROUND,
MF_SKILL_DAMAGE };
MF_SKILL_DAMAGE,
MF_SKILL_DURATION };
if (flag && std::find(disabled_mf.begin(), disabled_mf.end(), mapflag) != disabled_mf.end()) {
sprintf(atcmd_output,"[ @mapflag ] %s flag cannot be enabled as it requires unique values.", flag_name);

View File

@ -3569,6 +3569,7 @@ void map_flags_init(void){
// Clear adjustment data, will be reset after loading NPC
mapdata->damage_adjust = {};
mapdata->skill_damage.clear();
mapdata->skill_duration.clear();
map_free_questinfo(mapdata);
if (instance_start && i >= instance_start)
@ -3594,6 +3595,7 @@ void map_data_copy(struct map_data *dst_map, struct map_data *src_map) {
dst_map->flag.insert(src_map->flag.begin(), src_map->flag.end());
dst_map->skill_damage.insert(src_map->skill_damage.begin(), src_map->skill_damage.end());
dst_map->skill_duration.insert(src_map->skill_duration.begin(), src_map->skill_duration.end());
dst_map->zone = src_map->zone;
dst_map->qi_count = 0;
@ -4457,6 +4459,19 @@ void map_skill_damage_add(struct map_data *m, uint16 skill_id, int rate[SKILLDMG
m->skill_damage.insert({ skill_id, entry });
}
/**
* Add new skill duration adjustment entry for a map
* @param mapd: Map data
* @param skill_id: Skill ID to adjust
* @param per: Skill duration adjustment value in percent
*/
void map_skill_duration_add(struct map_data *mapd, uint16 skill_id, uint16 per) {
if (mapd->skill_duration.find(skill_id) != mapd->skill_duration.end()) // Entry exists
mapd->skill_duration[skill_id] += per;
else // Update previous entry
mapd->skill_duration.insert({ skill_id, per });
}
/**
* PvP timer handling (starting)
* @param bl: Player block object
@ -4833,6 +4848,16 @@ bool map_setmapflag_sub(int16 m, enum e_mapflag mapflag, bool status, union u_ma
}
mapdata->flag[mapflag] = status;
break;
case MF_SKILL_DURATION:
if (!status)
mapdata->skill_duration.clear();
else {
nullpo_retr(false, args);
map_skill_duration_add(mapdata, args->skill_duration.skill_id, args->skill_duration.per);
}
mapdata->flag[mapflag] = status;
break;
default:
mapdata->flag[mapflag] = status;
break;

View File

@ -578,6 +578,7 @@ enum e_mapflag : int16 {
MF_NOEXP,
MF_PRIVATEAIRSHIP_SOURCE,
MF_PRIVATEAIRSHIP_DESTINATION,
MF_SKILL_DURATION,
MF_MAX
};
@ -598,6 +599,12 @@ struct s_skill_damage {
int rate[SKILLDMG_MAX]; ///< Used for when all skills are adjusted
};
/// Struct of MF_SKILL_DURATION
struct s_skill_duration {
uint16 skill_id; ///< Skill ID
uint16 per; ///< Rate
};
/// Enum for item drop type for MF_PVP_NIGHTMAREDROP
enum e_nightmare_drop_type : uint8 {
NMDT_INVENTORY = 0x1,
@ -617,6 +624,7 @@ union u_mapflag_args {
struct point nosave;
struct s_drop_list nightmaredrop;
struct s_skill_damage skill_damage;
struct s_skill_duration skill_duration;
int flag_val;
};
@ -729,6 +737,7 @@ struct map_data {
uint32 zone; // zone number (for item/skill restrictions)
struct s_skill_damage damage_adjust; // Used for overall skill damage adjustment
std::unordered_map<uint16, s_skill_damage> skill_damage; // Used for single skill damage adjustment
std::unordered_map<uint16, int> skill_duration;
struct npc_data *npc[MAX_NPC_PER_MAP];
struct spawn_data *moblist[MAX_MOB_LIST_PER_MAP]; // [Wizputer]
@ -1116,6 +1125,7 @@ void map_addmap2db(struct map_data *m);
void map_removemapdb(struct map_data *m);
void map_skill_damage_add(struct map_data *m, uint16 skill_id, int rate[SKILLDMG_MAX], uint16 caster);
void map_skill_duration_add(struct map_data *mapd, uint16 skill_id, uint16 per);
enum e_mapflag map_getmapflag_by_name(char* name);
bool map_getmapflag_name(enum e_mapflag mapflag, char* output);

View File

@ -4129,7 +4129,7 @@ static const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, con
args.skill_damage.caster = BL_ALL;
for (int i = 0; i < SKILLDMG_MAX; i++)
args.skill_damage.rate[i] = cap_value(args.skill_damage.rate[i], -100, INT_MAX);
args.skill_damage.rate[i] = cap_value(args.skill_damage.rate[i], -100, 100000);
if (strcmp(skill_name, "all") == 0) // Adjust damage for all skills
map_setmapflag_sub(m, MF_SKILL_DAMAGE, true, &args);
@ -4145,6 +4145,28 @@ static const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, con
break;
}
case MF_SKILL_DURATION: {
union u_mapflag_args args = {};
if (!state)
map_setmapflag_sub(m, MF_SKILL_DURATION, false, &args);
else {
char skill_name[SKILL_NAME_LENGTH];
if (sscanf(w4, "%30[^,],%5hu[^\n]", skill_name, &args.skill_duration.per) == 2) {
args.skill_duration.skill_id = skill_name2id(skill_name);
if (!args.skill_duration.skill_id)
ShowError("npc_parse_mapflag: skill_duration: Invalid skill name '%s' for Skill Duration mapflag. Skipping (file '%s', line '%d')\n", skill_name, filepath, strline(buffer, start - buffer));
else {
args.skill_duration.per = cap_value(args.skill_duration.per, 0, UINT16_MAX);
map_setmapflag_sub(m, MF_SKILL_DURATION, true, &args);
}
}
}
break;
}
// All others do not need special treatment
default:
map_setmapflag(m, mapflag, state);

View File

@ -12448,6 +12448,20 @@ BUILDIN_FUNC(setmapflag)
return SCRIPT_CMD_FAILURE;
}
break;
case MF_SKILL_DURATION:
if (script_hasdata(st, 4) && script_hasdata(st, 5)) {
args.skill_duration.skill_id = script_getnum(st, 4);
if (!skill_get_index(args.skill_duration.skill_id)) {
ShowError("buildin_setmapflag: Invalid skill ID %d for skill_duration mapflag.\n", args.skill_duration.skill_id);
return SCRIPT_CMD_FAILURE;
}
args.skill_duration.per = script_getnum(st, 5);
} else {
ShowWarning("buildin_setmapflag: Unable to set skill_duration mapflag as flag data is missing.\n");
return SCRIPT_CMD_FAILURE;
}
break;
case MF_NOSAVE: // Assume setting "SavePoint"
args.nosave.map = 0;
args.nosave.x = -1;

View File

@ -455,6 +455,7 @@
export_constant(MF_NOEXP);
export_constant(MF_PRIVATEAIRSHIP_SOURCE);
export_constant(MF_PRIVATEAIRSHIP_DESTINATION);
export_constant(MF_SKILL_DURATION);
/* setcell types */
export_constant(CELL_WALKABLE);

View File

@ -12781,10 +12781,12 @@ struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 skill_
int active_flag = 1;
int subunt = 0;
bool hidden = false;
struct map_data *mapdata;
nullpo_retr(NULL, src);
limit = skill_get_time(skill_id,skill_lv);
mapdata = map_getmapdata(src->m);
limit = skill_get_time3(mapdata, skill_id,skill_lv);
range = skill_get_unit_range(skill_id,skill_lv);
interval = skill_get_unit_interval(skill_id);
target = skill_get_unit_target(skill_id);
@ -13195,7 +13197,6 @@ struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 skill_
int unit_val1 = skill_lv;
int unit_val2 = 0;
int alive = 1;
struct map_data *mapdata = map_getmapdata(src->m);
// are the coordinates out of range?
if( ux <= 0 || uy <= 0 || ux >= mapdata->xs || uy >= mapdata->ys ){
@ -20969,6 +20970,24 @@ static bool skill_check_unit_movepos(uint8 check_flag, struct block_list *bl, sh
return unit_movepos(bl, dst_x, dst_y, easy, checkpath);
}
/**
* Get skill duration after adjustments by skill_duration mapflag
* @param mapdata: Source map data
* @param skill_id: Skill ID
* @param skill_lv: Skill level
* @return Adjusted skill duration
*/
int skill_get_time3(struct map_data *mapdata, uint16 skill_id, uint16 skill_lv) {
int time = 0;
if (!skill_get_index(skill_id) || !(time = skill_get_time(skill_id, skill_lv)))
return 0;
if (mapdata && !mapdata->skill_duration.empty() && mapdata->skill_duration.find(skill_id) != mapdata->skill_duration.end())
return time / 100 * mapdata->skill_duration[skill_id];
return time;
}
/*==========================================
* sub-function of DB reading.
* skill_db.txt

View File

@ -2214,6 +2214,7 @@ void skill_combo_toggle_inf(struct block_list* bl, uint16 skill_id, int inf);
void skill_combo(struct block_list* src,struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int tick);
void skill_reveal_trap_inarea(struct block_list *src, int range, int x, int y);
int skill_get_time3(struct map_data *mapdata, uint16 skill_id, uint16 skill_lv);
/// Variable name of copied skill by Plagiarism
#define SKILL_VAR_PLAGIARISM "CLONE_SKILL"