From 64a4adaa06f1059c4ac705199d5a0716c8edef60 Mon Sep 17 00:00:00 2001 From: mekolat Date: Tue, 4 Nov 2014 13:01:07 -0500 Subject: fix fight club => v0.4 disallow towel inside ring kill on exit replace killer var with duel_killer remove nosave trigger restart on enable/disable remove accept/decline notification fix ring x2 and y2 forbid betsanc and asorm fix password var in debug allow random passwords handle all effects do not accept if not present fix rules check map too warp randomly on death fallthrough if no acceptable requests use bitmasking instead of modulo remove resave simplify goback do not re-declare randompassword password minigame --- world/map/conf/magic-level1.sex | 20 ++++++++++---------- world/map/conf/magic-level2.sex | 28 ++++++++++++++-------------- world/map/conf/magic-level3.sex | 2 +- world/map/conf/magic-misc.sex | 2 +- world/map/conf/magic-procedures.sex | 25 +++++++++++++++++-------- 5 files changed, 43 insertions(+), 34 deletions(-) (limited to 'world/map/conf') diff --git a/world/map/conf/magic-level1.sex b/world/map/conf/magic-level1.sex index a4aaa8a2..af34d27a 100644 --- a/world/map/conf/magic-level1.sex +++ b/world/map/conf/magic-level1.sex @@ -7,7 +7,7 @@ (GUARD (CASTTIME 500)) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (SCRIPT "{callfunc \"CheckWand\";}") (IF (== (script_int caster "@Wand") @@ -203,7 +203,7 @@ (GUARD (COMPONENTS "Lifestone"))) (EFFECT - (CALL fightclub_check 1) + (CALL fightclub_check 1 0) (CALL adjust_spellpower school) (CALL default_effect) (IF (failed @@ -264,7 +264,7 @@ 2)) (COMPONENTS "SulphurPowder")))) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower school) (CALL default_effect) (SET damage @@ -301,7 +301,7 @@ (=> (COMPONENTS "SharpKnife") (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower WAR) (CALL default_effect) (CALL install_melee_spell @@ -317,7 +317,7 @@ (=> (COMPONENTS "Knife") (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower WAR) (CALL default_effect) (CALL install_melee_spell @@ -370,7 +370,7 @@ level)) (COMPONENTS "MauveHerb" "Root")) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower school) (CALL default_effect) (CALL gain_xp 1 6) @@ -400,7 +400,7 @@ level)) (COMPONENTS "AlizarinHerb" "Root")) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower school) (CALL default_effect) (CALL gain_xp 1 7) @@ -430,7 +430,7 @@ level)) (COMPONENTS "GambogeHerb" "Root")) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower school) (CALL default_effect) (CALL gain_xp 1 8) @@ -460,7 +460,7 @@ level)) (COMPONENTS "CobaltHerb" "Root")) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower school) (CALL default_effect) (CALL gain_xp 1 9) @@ -490,7 +490,7 @@ level)) (COMPONENTS "MaggotSlime" "Root")) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower school) (CALL gain_xp 1 10) (CALL summon_spell 1002 diff --git a/world/map/conf/magic-level2.sex b/world/map/conf/magic-level2.sex index 827cd847..c1e61bf5 100644 --- a/world/map/conf/magic-level2.sex +++ b/world/map/conf/magic-level2.sex @@ -225,8 +225,8 @@ (is_in (location (pc target)) (@+ (@ "009-7.gat" (script_int caster "$@fightclub_x1") (script_int caster "$@fightclub_y1")) - (- (script_int caster "$@fightclub_x2") (script_int caster "$@fightclub_x1")) - (- (script_int caster "$@fightclub_y2") (script_int caster "$@fightclub_y1")))))) + (+ (- (script_int caster "$@fightclub_x2") (script_int caster "$@fightclub_x1")) 1) + (+ (- (script_int caster "$@fightclub_y2") (script_int caster "$@fightclub_y1")) 1))))) (REQUIRE (if_then_else (failed @@ -361,7 +361,7 @@ 3)) (COMPONENTS "IronPowder")))) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower school) (SET damage spellpower) (SET damage_bonus @@ -564,7 +564,7 @@ 3)) (COMPONENTS "Beer")))) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower WAR) (SET str (str caster)) @@ -599,7 +599,7 @@ 40)) (COMPONENTS "DarkCrystal" "SnakeEgg")) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower school) (CALL default_effect) (CALL gain_xp 3 31) @@ -636,7 +636,7 @@ (COMPONENTS (2 "Root"))))) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower school) (CALL default_effect) (SET damage @@ -691,7 +691,7 @@ level)) (COMPONENTS "SmallMushroom" "DarkCrystal")) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower school) (CALL default_effect) (CALL gain_xp 3 36) @@ -734,7 +734,7 @@ (+ 2 (/ spellpower 30))))) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower school) (CALL default_effect) (IF (!= caster target) @@ -783,7 +783,7 @@ (+ 2 (/ spellpower 30))))) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 1) (CALL adjust_spellpower school) (sfx target 11 0) (IF (!= caster target) @@ -1075,7 +1075,7 @@ (+ 2 (/ spellpower 30))))) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 1) (CALL adjust_spellpower school) (sfx target SFX_BARRIER 0) (IF (!= caster target) @@ -1112,7 +1112,7 @@ level)) (COMPONENTS "HardSpike" "Root")) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower school) (CALL default_effect) (CALL gain_xp 1 26) @@ -1142,7 +1142,7 @@ level)) (COMPONENTS "WhiteFur" "Root")) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower school) (CALL default_effect) (CALL gain_xp 1 27) @@ -1174,7 +1174,7 @@ level)) (COMPONENTS "MoubooFigurine" "Root")) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower school) (CALL default_effect) (CALL gain_xp 2 37) @@ -1204,7 +1204,7 @@ level)) (COMPONENTS "PinkAntenna" "Root")) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower school) (CALL default_effect) (CALL gain_xp 2 38) diff --git a/world/map/conf/magic-level3.sex b/world/map/conf/magic-level3.sex index 21b5692f..d53f1a19 100644 --- a/world/map/conf/magic-level3.sex +++ b/world/map/conf/magic-level3.sex @@ -53,7 +53,7 @@ level)) (COMPONENTS "PileOfAsh")) (EFFECT - (CALL fightclub_check 0) + (CALL fightclub_check 0 0) (CALL adjust_spellpower school) (SET damage (min diff --git a/world/map/conf/magic-misc.sex b/world/map/conf/magic-misc.sex index 4a08f118..a1cd0dbc 100644 --- a/world/map/conf/magic-misc.sex +++ b/world/map/conf/magic-misc.sex @@ -19,7 +19,7 @@ (=> (GUARD (REQUIRE - (== (% (script_int target "$fightclub_enabled") 5) 3))) + (== (& (script_int target "$SANGUINE") (script_int target "$@SV_FCDBit")) 0))) (EFFECT (IF (== target caster) (BLOCK diff --git a/world/map/conf/magic-procedures.sex b/world/map/conf/magic-procedures.sex index e9ec7aae..e510ec3f 100644 --- a/world/map/conf/magic-procedures.sex +++ b/world/map/conf/magic-procedures.sex @@ -280,26 +280,35 @@ (PROCEDURE install_melee_spell (charges base_delay attack_animation) (CALL install_attack_spell charges base_delay 1 attack_animation)) -(PROCEDURE fightclub_check (healing) +(PROCEDURE fightclub_check (onSelf onTarget) (IF (&& (is_in (location caster) (@+ (@ "009-7.gat" (script_int caster "$@fightclub_x1") (script_int caster "$@fightclub_y1")) - (- (script_int caster "$@fightclub_x2") (script_int caster "$@fightclub_x1")) - (- (script_int caster "$@fightclub_y2") (script_int caster "$@fightclub_y1")))) + (+ (- (script_int caster "$@fightclub_x2") (script_int caster "$@fightclub_x1")) 1) + (+ (- (script_int caster "$@fightclub_y2") (script_int caster "$@fightclub_y1")) 1))) (|| (== (script_int caster "$@Duel_NoMagic") 1) (!= (script_int caster "@Duel_Fighter") 1))) (ABORT)) - (IF (== healing 1) + (IF (== onSelf 1) (IF (&& (== (substr (location caster) 2 5) "009-7") (not (is_in (location caster) (@+ (@ "009-7.gat" (script_int caster "$@fightclub_x1") (script_int caster "$@fightclub_y1")) - (- (script_int caster "$@fightclub_x2") (script_int caster "$@fightclub_x1")) - (- (script_int caster "$@fightclub_y2") (script_int caster "$@fightclub_y1")))))) + (+ (- (script_int caster "$@fightclub_x2") (script_int caster "$@fightclub_x1")) 1) + (+ (- (script_int caster "$@fightclub_y2") (script_int caster "$@fightclub_y1")) 1))))) + (ABORT))) + (IF (== onTarget 1) + (IF (&& + (!= (pc target) caster) + (is_in (location (pc target)) + (@+ + (@ "009-7.gat" (script_int caster "$@fightclub_x1") (script_int caster "$@fightclub_y1")) + (+ (- (script_int caster "$@fightclub_x2") (script_int caster "$@fightclub_x1")) 1) + (+ (- (script_int caster "$@fightclub_y2") (script_int caster "$@fightclub_y1")) 1)))) (ABORT)))) (PROCEDURE summon_spell (mob_id count delay lifetime control_level school) @@ -312,8 +321,8 @@ (is_in (location caster) (@+ (@ "009-7.gat" (- (script_int caster "$@fightclub_x1") 2) (- (script_int caster "$@fightclub_y1") 2)) - (+ (- (script_int caster "$@fightclub_x2") (script_int caster "$@fightclub_x1")) 2) - (+ (- (script_int caster "$@fightclub_y2") (script_int caster "$@fightclub_y1")) 2))) 1 2)) + (+ (- (script_int caster "$@fightclub_x2") (script_int caster "$@fightclub_x1")) 5) + (+ (- (script_int caster "$@fightclub_y2") (script_int caster "$@fightclub_y1")) 5))) 1 2)) caster mob_id (if_then_else -- cgit v1.2.3-70-g09d2