summaryrefslogtreecommitdiff
path: root/world/map/conf/magic-procedures.sex
diff options
context:
space:
mode:
authormekolat <mekolat@gmail.com>2014-11-04 13:01:07 -0500
committermekolat <mekolat@gmail.com>2014-11-12 14:02:47 -0500
commit64a4adaa06f1059c4ac705199d5a0716c8edef60 (patch)
tree32d1f05c6e846aa791f82d1773f2972f71ad166e /world/map/conf/magic-procedures.sex
parent0ca075ae66c4e6a983e1f25f6e63a39ee12a568e (diff)
downloadserverdata-64a4adaa06f1059c4ac705199d5a0716c8edef60.tar.gz
serverdata-64a4adaa06f1059c4ac705199d5a0716c8edef60.tar.bz2
serverdata-64a4adaa06f1059c4ac705199d5a0716c8edef60.tar.xz
serverdata-64a4adaa06f1059c4ac705199d5a0716c8edef60.zip
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
Diffstat (limited to 'world/map/conf/magic-procedures.sex')
-rw-r--r--world/map/conf/magic-procedures.sex25
1 files changed, 17 insertions, 8 deletions
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