summaryrefslogtreecommitdiff
path: root/world/map/conf
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/conf')
-rw-r--r--world/map/conf/magic-anchors.sex66
-rw-r--r--world/map/conf/magic-config.sex68
-rw-r--r--world/map/conf/magic-misc.sex105
-rw-r--r--world/map/conf/magic-procedures.sex340
-rw-r--r--world/map/conf/magic-quickdebug.sex10
5 files changed, 0 insertions, 589 deletions
diff --git a/world/map/conf/magic-anchors.sex b/world/map/conf/magic-anchors.sex
deleted file mode 100644
index 3bb16f75..00000000
--- a/world/map/conf/magic-anchors.sex
+++ /dev/null
@@ -1,66 +0,0 @@
-"--------------------------------------------------------------------------------"
-" Teleport anchors(disabled) "
-" As of now, only the #vorp spell(disabled) uses them "
-"--------------------------------------------------------------------------------"
-(DISABLED
- (TELEPORT-ANCHOR tulimshar "tulimshar"
- (@+
- (@ "001-1" 43 66)
- 3
- 3)))
-
-(DISABLED
- (TELEPORT-ANCHOR hurnscald "hurnscald"
- (@+
- (@ "009-1" 55 37)
- 3
- 3)))
-
-(DISABLED
- (TELEPORT-ANCHOR nivalis "nivalis"
- (@+
- (@ "020-1" 75 63)
- 19
- 12)))
-
-(DISABLED
- (TELEPORT-ANCHOR wizardhut "##00"
- (@+
- (@ "013-1" 41 92)
- 3
- 3)))
-
-(DISABLED
- (TELEPORT-ANCHOR pachua "##01"
- (@+
- (@ "006-1" 22 101)
- 3
- 3)))
-
-(DISABLED
- (TELEPORT-ANCHOR desert "##02"
- (@+
- (@ "005-1" 160 64)
- 5
- 5)))
-
-(DISABLED
- (TELEPORT-ANCHOR forest "##03"
- (@+
- (@ "015-1" 35 35)
- 40
- 40)))
-
-(DISABLED
- (TELEPORT-ANCHOR snakecave "##04"
- (@+
- (@ "011-4" 50 75)
- 3
- 3)))
-
-(DISABLED
- (TELEPORT-ANCHOR dimondscove "##05"
- (@+
- (@ "010-2" 23 79)
- 3
- 3)))
diff --git a/world/map/conf/magic-config.sex b/world/map/conf/magic-config.sex
deleted file mode 100644
index a130becf..00000000
--- a/world/map/conf/magic-config.sex
+++ /dev/null
@@ -1,68 +0,0 @@
-"Special-purpose globals"
-(SET obscure_chance 95)
-(SET min_casttime 200)
-
-"Schools of magic"
-(CONST MAGIC 340)
-(CONST LIFE 341)
-(CONST WAR 342)
-(CONST TRANSMUTE 343)
-(CONST NATURE 344)
-(CONST ASTRAL 345)
-(CONST DARK 346)
-
-"Elements"
-(CONST ELT_NEUTRAL 0)
-(CONST ELT_WATER 1)
-(CONST ELT_EARTH 2)
-(CONST ELT_FIRE 3)
-(CONST ELT_WIND 4)
-(CONST ELT_POISON 5)
-(CONST ELT_SHADOW 6)
-(CONST ELT_HOLY 7)
-(CONST ELT_GHOST 8)
-(CONST ELT_UNDEAD 9)
-
-"Status effects"
-(CONST SC_POISON 132)
-(CONST SC_SHEARED 194) "This is the same as SC_HIDE, since mobs can't hide and shearing is only used for mobs. Feel free to fix!"
-(CONST SC_HIDE 194)
-(CONST SC_HALT_REGENERATE 195)
-(CONST SC_FLYING_BACKPACK 196)
-(CONST SC_MBARRIER 197)
-(CONST SC_HASTE 198)
-(CONST SC_PHYS_SHIELD 199)
-(CONST SO_GMHIDE 64)
-(CONST SO_GMINVISIBLE 4096)
-
-"Special effects"
-(CONST SFX_DEFAULT 10)
-(CONST SFX_SUMMON_START 21)
-(CONST SFX_SUMMON_FIRE 22)
-(CONST SFX_TELEPORT 24)
-(CONST SFX_RAIN 25)
-(CONST SFX_HIT 25)
-(CONST SFX_ARROW_HAIL 27)
-(CONST SFX_BARRIER 10)
-(CONST SFX_UNBARRIER 10)
-(CONST SFX_HEAL 3)
-(CONST SFX_LIGHTNING 18)
-
-"Magic Spell Const"
-(CONST MIN_MARRY_LEVEL 32)
-(CONST MAX_RAIN_SPELL_RADIUS 15)
-(CONST MAX_MAGIC_LEVEL 2) "Increase up to 5 as each new magic level is completed."
-(CONST MAGIC_FLAGS "MAGIC_FLAGS")
-(CONST MFLAG_MADE_CONC_POTION 16384)
-(CONST MFLAG_MADE_CONC_POTION_SHIFT 14)
-(CONST SCRIPT_XP "MAGIC_EXPERIENCE")
-(CONST SCRIPT_XP_MASK 0xffff)
-(CONST SCRIPT_XP_SHIFT 0)
-(CONST SCRIPT_LASTSPELL_MASK 0xff)
-(CONST SCRIPT_LASTSPELL_SHIFT 16)
-(CONST SCRIPT_HEALSPELL_MASK 0xff)
-(CONST SCRIPT_HEALSPELL_SHIFT 24)
-(CONST DEBUG 0)
-(CONST ATTACK_ICON_GENERIC 2000)
-(CONST ATTACK_ICON_SHEARING 2001)
-(CONST E10_FLAG_USED_FREE_WARP_SHIFT 17)
diff --git a/world/map/conf/magic-misc.sex b/world/map/conf/magic-misc.sex
deleted file mode 100644
index 14d6ea3a..00000000
--- a/world/map/conf/magic-misc.sex
+++ /dev/null
@@ -1,105 +0,0 @@
-"--------------------------------------------------------------------------------"
-" Special-purpose quasispells "
-"--------------------------------------------------------------------------------"
-
-(SPELL (NONMAGIC SILENT) marriage "marry" (PC target)
- (=>
- (GUARD
- (REQUIRE
- (||
- (is_in
- (location caster)
- (@+
- (@ "014-1" 28 39)
- 8
- 6))
- (is_in
- (location caster)
- (@+
- (@ "001-2" 21 27)
- 4
- 4)))))
- (EFFECT
- (IF (== target caster)
- (ABORT)) "no valid target or tried to marry self?"
- (IF (<
- (level caster)
- MIN_MARRY_LEVEL)
- (BLOCK
- (message caster
- (+
- (+ "You must be level " MIN_MARRY_LEVEL)
- " or higher to marry!"))
- (ABORT)))
- (IF (<
- (level target)
- MIN_MARRY_LEVEL)
- (BLOCK
- (message caster
- (+
- (+ "Your partner must be level " MIN_MARRY_LEVEL)
- " or higher to marry!"))
- (ABORT)))
- (IF (==
- (partner caster)
- target)
- (BLOCK
- (message caster
- (+
- (+ "You and "
- (name_of target))
- " are already married."))
- (ABORT)))
- (IF (is_married caster)
- (BLOCK
- (message caster "You are already married!")
- (ABORT)))
- (IF (is_married target)
- (BLOCK
- (message caster
- (+
- (name_of target)
- " is already married."))
- (ABORT)))
- (IF (!=
- (distance
- (location caster)
- (location target))
- 1)
- (BLOCK
- (message caster "You need to stand next to each other.")
- (ABORT)))
- (IF (||
- (==
- (count_item caster "WeddingRing")
- 0)
- (==
- (count_item target "WeddingRing")
- 0))
- (BLOCK
- (message caster "You must both be wearing your wedding rings!")
- (ABORT)))
- (SET script_target target)
- (SCRIPT "{
- announce @caster_name$ + \" is asking \" + strcharinfo(0) + \" for marriage.\", 2;
- mes @caster_name$ + \" wishes to marry you.\";
- mes \"Do you accept?\";
- next;
- menu
- \"Yes, I do!\", L_yes,
- \"No.\", L_Close;
-
- L_yes:
- if (marriage(@caster_name$))
- announce @caster_name$ + \" and \" + strcharinfo(0) + \" are now married!\", 0;
- goto L_Close;
-
- L_Close:
- close;
- }")
- (IF (not
- (is_married caster))
- (message caster
- (+
- (name_of target)
- " turned down your marriage offer."))))))
diff --git a/world/map/conf/magic-procedures.sex b/world/map/conf/magic-procedures.sex
deleted file mode 100644
index 0ba40bc8..00000000
--- a/world/map/conf/magic-procedures.sex
+++ /dev/null
@@ -1,340 +0,0 @@
-"Default sfx on caster"
-(PROCEDURE default_effect ()
- (sfx caster
- (+
- (- school MAGIC)
- 2)
- 0))
-
-(PROCEDURE sfx_generic (target)
- (sfx target SFX_DEFAULT 0))
-
-(PROCEDURE sfx_lightning (target)
- (sfx target SFX_LIGHTNING 0))
-
-(PROCEDURE set_var (name mask shift value)
- (set_script_variable caster name
- (|
- (&
- (script_int caster name)
- (neg
- (<< mask shift)))
- (<<
- (& value mask)
- shift))))
-
-"value is How many HP we healed"
-"gain is how many life magic experience points we can potentially gain"
-"heal_xp_value_divisor is 1 for instaheal, 2 for slow heal"
-"base_exp_factor is the factor for how many base experience points (max) the player should be allowed to gain"
-(PROCEDURE gain_heal_xp (value gain heal_xp_value_divisor base_exp_factor)
- (SET last_heal_xp
- (&
- (>>
- (script_int caster SCRIPT_XP)
- SCRIPT_HEALSPELL_SHIFT)
- SCRIPT_HEALSPELL_MASK))
- (IF (&&
- (!= target caster)
- (>
- (/ value heal_xp_value_divisor)
- (+
- (+
- (+ 10 last_heal_xp)
- (random
- (+ last_heal_xp 1)))
- (random
- (+ last_heal_xp 1)))))
- (BLOCK
- (SET heal_xp
- (+ last_heal_xp gain))
- (IF (> heal_xp SCRIPT_HEALSPELL_MASK)
- (SET heal_xp SCRIPT_HEALSPELL_MASK))
- (CALL set_var SCRIPT_XP SCRIPT_HEALSPELL_MASK SCRIPT_HEALSPELL_SHIFT heal_xp)))
- (IF (!= target caster)
- (gain_experience caster
- (* base_exp_factor
- (extract_healer_experience target value))
- 0
- 1)))
-
-(PROCEDURE gain_xp (gain index)
- "Level 4 and 5 magic users don't gain anything from spell levels 0 resp. 0+1"
- (IF (>
- (+ level 3)
- (skill caster MAGIC))
- (BLOCK
- (SET last_index
- (&
- (>>
- (script_int caster SCRIPT_XP)
- SCRIPT_LASTSPELL_SHIFT)
- SCRIPT_LASTSPELL_MASK))
- (SET last_xp
- (&
- (>>
- (script_int caster SCRIPT_XP)
- SCRIPT_XP_SHIFT)
- SCRIPT_XP_MASK))
- (IF (!= index last_index)
- (BLOCK "Some variation observed"
- (SET xp
- (+ last_xp gain))
- (IF (> xp SCRIPT_XP_MASK)
- (SET xp SCRIPT_XP_MASK))
- (CALL set_var SCRIPT_XP SCRIPT_XP_MASK SCRIPT_XP_SHIFT xp)
- (CALL set_var SCRIPT_XP SCRIPT_LASTSPELL_MASK SCRIPT_LASTSPELL_SHIFT index)
- (IF DEBUG
- (message caster
- (+ "Spell xp = " xp))))
- (IF DEBUG
- (message caster
- (+ "Re-cast same spell, xp remain at " last_xp)))))))
-
-(PROCEDURE create_item (good_item count bad_item difficulty)
- (SET success 1)
- (SET score
- (+ experience
- (random
- (min spellpower
- (+
- (/ experience 3)
- 1)))))
- (IF (>= score difficulty)
- (create_item caster good_item count)
- (BLOCK
- (SET success 0)
- (SET score
- (+
- (+ score
- (random
- (luk caster)))
- (random
- (luk caster))))
- (IF (< score
- (/ difficulty 3))
- (BLOCK
- (message caster "Your spell backfires!")
- (IF (<
- (random 110)
- (luk caster))
- (itemheal caster
- (- 0
- (*
- (*
- (+ level 1)
- (+ level 2))
- (+ 3
- (random 28))))
- 0)
- (itemheal caster
- (- 0
- (+ level 1))
- 0)))
- (IF (< score
- (/
- (* difficulty 2)
- 3))
- (BLOCK
- (IF (==
- (random 5)
- 0)
- (BLOCK
- (message caster "Your spell solidifies into the shape of a mysterious object!")
- (create_item caster "Iten" 1))
- (message caster "Your spell escapes!")))
- (BLOCK
- (message caster "Your spell takes on a mind of its own!")
- (IF (==
- (random 3)
- 0)
- (create_item caster bad_item 1))))))))
-
-"Increase spellpower by school and general magic skill"
-(PROCEDURE adjust_spellpower (school)
- (SET experience
- (&
- (>>
- (script_int caster SCRIPT_XP)
- SCRIPT_XP_SHIFT)
- SCRIPT_XP_MASK))
- (SET spellpower
- (+ spellpower
- (*
- (+
- (skill caster MAGIC)
- (skill caster school))
- 10)))
- "Below, we adjust by special items"
- (IF (&&
- (not
- (failed target))
- (||
- (== school LIFE)
- (== school NATURE)))
- (IF target
- (IF (==
- (pc target)
- (partner caster))
- (BLOCK
- (SET spellpower
- (+ spellpower 200))
- (IF (is_equipped caster "WeddingRing")
- (SET spellpower
- (+ spellpower 50)))
- (IF (is_equipped
- (pc target)
- "WeddingRing")
- (SET spellpower
- (+ spellpower 50))))))))
-
-(PROCEDURE heal (target max_heal)
- (CALL default_effect)
- (IF (!= caster target)
- (sfx target SFX_HEAL 0))
- (SET power
- (+ spellpower
- (vit caster)))
- (SET power
- (min max_heal
- (/
- (* max_heal power)
- 250)))
- (itemheal target power 0))
-
-"Goes through instaheal instead of itemheal"
-(PROCEDURE quickheal (target power)
- (CALL default_effect)
- (IF (!= caster target)
- (sfx target SFX_HEAL 0))
- (instaheal target power 0))
-
-"Can attack the target? Imports attack_range from dynamic environment"
-(PROCEDURE attack_check (target)
- (IF (not
- (line_of_sight
- (location caster)
- (location target)))
- (ABORT))
- (IF (not
- (<=
- (rdistance
- (location caster)
- (location target))
- attack_range))
- (ABORT)))
-
-"Cause elemental damage. bonus_elt grants an attack bonus, malus_elt reduces the attack. `effect' is the sfx ID."
-(PROCEDURE elt_damage (target damage dmgplus bonus_elt malus_elt effect)
- (SET d
- (+ damage
- (random dmgplus)))
- (IF (==
- (element target)
- malus_elt)
- (SET d
- (/ d 3)))
- (IF (==
- (element target)
- bonus_elt)
- (SET d
- (/
- (* d
- (+ 4
- (element_level target)))
- 4)))
- (sfx target effect 0)
- (injure caster target d 0))
-
-(PROCEDURE melee_damage (target damage dmgplus)
- (CALL attack_check target)
- (SET d
- (+ damage
- (random dmgplus)))
- (SET evade
- (+
- (level target)
- (mdef target)))
- (IF (<
- (- spellpower
- (random 100))
- evade)
- (SET d 0))
- (injure caster target d 0))
-
-(PROCEDURE install_attack_spell (charges base_delay range attack_animation)
- (CALL default_effect)
- (SET attack_range range)
- (override_attack caster charges
- (/
- (*
- (- 200
- (agi caster))
- base_delay)
- 200)
- range
- ATTACK_ICON_GENERIC
- attack_animation
- 0))
-
-(PROCEDURE install_melee_spell (charges base_delay attack_animation)
- (CALL install_attack_spell charges base_delay 1 attack_animation))
-
-(PROCEDURE summon_spell (mob_id count delay lifetime control_level school)
- (CALL default_effect)
- (sfx location SFX_SUMMON_START 0)
- (WAIT delay)
- (sfx location SFX_SUMMON_FIRE 0)
- (spawn
- (rbox location 2)
- caster
- mob_id
- (if_then_else
- (>=
- (skill caster school)
- control_level)
- 2
- 1)
- count
- lifetime)) "pets when level is high enough"
-
-(PROCEDURE abort_on_area_shield (pos)
- (IF (&&
- (==
- (is_exterior pos)
- 1)
- (||
- (||
- (==
- (map_nr pos)
- 1)
- (==
- (map_nr pos)
- 9))
- (==
- (map_nr pos)
- 20)))
- (BLOCK "1 is Tulimshar, 9 is Hurnscald and 20 is Nivalis"
- (message caster "A powerful magic drains your spell just as it is beginning to take shape!")
- (ABORT))))
-
-(PROCEDURE script_split_str (d str v m)
- (FOR a 0 m
- (BLOCK
- (IF (< (strlen str) 1) (BREAK))
- (SET arglen (strlen str))
- (SET argoffset
- (if_then_else
- (contains_string str d)
- (strstr str d)
- arglen))
- (SET arg
- (if_then_else (== arglen argoffset)
- str
- (substr str 0 argoffset)))
- (set_script_str caster (+ (+ "@" v) (+ a "$")) arg)
- (SET str
- (if_then_else
- (> arglen (- argoffset 1))
- (substr str (+ argoffset 1) arglen)
- "")))))
diff --git a/world/map/conf/magic-quickdebug.sex b/world/map/conf/magic-quickdebug.sex
deleted file mode 100644
index 1b5f582c..00000000
--- a/world/map/conf/magic-quickdebug.sex
+++ /dev/null
@@ -1,10 +0,0 @@
-"--------------------------------------------------------------------------------"
-"Quickdebug Spells"
-"--------------------------------------------------------------------------------"
-(SPELL (NONMAGIC SILENT) debug0 "#debug" ()
- (EFFECT
- (SCRIPT "{if(!debug&&(getgmlevel()<99))end;callfunc \"Debug\";}")))
-
-(SPELL (NONMAGIC SILENT) debug1 "#numa" ()
- (EFFECT
- (SCRIPT "{if(!debug&&(getgmlevel()<99))end;callfunc \"SuperDebug\";}")))