Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 19 additions & 16 deletions __DEFINES/spell_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,33 @@
#define NO_SPELLBOOK 131072 //Does not show up in the spell list for spellbook purposes

//invocation
#define SpI_SHOUT "shout"
#define SpI_WHISPER "whisper"
#define SpI_EMOTE "emote"
#define SpI_NONE "none"
#define SP_INV_SHOUT "shout"
#define SP_INV_WHISPER "whisper"
#define SP_INV_EMOTE "emote"
#define SP_INV_NONE "none"

//upgrading
#define Sp_SPEED "cooldown"
#define Sp_POWER "power"
#define Sp_MOVE "mobility"
#define Sp_AMOUNT "amount"
#define Sp_RANGE "range"
#define SP_SPEED "cooldown"
#define SP_POWER "power"
#define SP_MOVE "mobility"
#define SP_AMOUNT "amount"
#define SP_RANGE "range"

#define Sp_TOTAL "total"
#define SP_TOTAL "total"

//casting costs
#define Sp_RECHARGE 1
#define Sp_CHARGES 2
#define Sp_HOLDVAR 4
#define Sp_GRADUAL 8
#define Sp_PASSIVE 16
#define SP_RECHARGE 1
#define SP_CHARGES 2
#define SP_HOLDVAR 4
#define SP_GRADUAL 8
#define SP_PASSIVE 16

//spell range
#define SELFCAST -1
#define GLOBALCAST -2

//buying costs
#define Sp_BASE_PRICE 20
#define SP_BASE_PRICE 20

//Autocast flags
#define AUTOCAST_NOTARGET 1 //For spells with complex targeting (AI can't pick a target)
Expand Down Expand Up @@ -95,3 +95,6 @@
#define SPECIFIC_TELEPATHY 1
#define LOCAL_TELEPATHY 2
#define GLOBAL_TELEPATHY 4

// Purely helper proc to make code more readable
#define CHARGES *1
6 changes: 3 additions & 3 deletions code/_onclick/hud/spell_screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,12 @@
spell_icon = spell.hud_state
overlays -= spell_icon

if((spell.charge_type & Sp_RECHARGE) || (spell.charge_type & Sp_CHARGES) || (spell.charge_type & Sp_GRADUAL))
if(spell.charge_counter < spell.charge_max)
if((spell.charge_type & SP_RECHARGE) || (spell.charge_type & SP_CHARGES) || (spell.charge_type & SP_GRADUAL))
if(spell.charge_counter < spell.charge_cooldown_max)
icon_state = "[spell_base]_spell_base"
if(spell.charge_counter > 0)
var/icon/partial_charge = icon(src.icon, "[spell_base]_spell_ready")
partial_charge.Crop(1, 1, partial_charge.Width(), round(partial_charge.Height() * spell.charge_counter / spell.charge_max))
partial_charge.Crop(1, 1, partial_charge.Width(), round(partial_charge.Height() * spell.charge_counter / spell.charge_cooldown_max))
overlays += partial_charge
if(last_charged_icon)
overlays -= last_charged_icon
Expand Down
10 changes: 5 additions & 5 deletions code/datums/gamemode/factions/bloodcult/bloodcult_spells.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ var/list/arcane_pockets = list()
desc = "Cast while holding an Arcane Tome to discretly store it through the veil."
hud_state = "cult_pocket_empty"

invocation_type = SpI_NONE
charge_type = Sp_RECHARGE
charge_max = 0
invocation_type = SP_INV_NONE
charge_type = SP_RECHARGE
charge_cooldown_max = 0
range = 0
spell_flags = null
insufficient_holder_msg = ""
Expand Down Expand Up @@ -84,7 +84,7 @@ var/list/arcane_pockets = list()
user_type = USER_TYPE_CULT
hud_state = "astral_return"
override_base = "cult"
charge_max = 0
charge_cooldown_max = 0
spell_flags = 0
range = 0

Expand All @@ -100,7 +100,7 @@ var/list/arcane_pockets = list()
name = "Toggle Tangibility"
desc = "Turn into a visible copy of your body, able to speak and bump into doors. But note that the slightest source of damage will dispel your astral projection altogether."
user_type = USER_TYPE_CULT
charge_max = 50//relatively short, but still there to prevent too much spamming in/out of tangibility
charge_cooldown_max = 5 SECONDS//relatively short, but still there to prevent too much spamming in/out of tangibility
hud_state = "astral_toggle"
override_base = "cult"
spell_flags = 0
Expand Down
4 changes: 2 additions & 2 deletions code/datums/gamemode/factions/legacy_cult/runes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1450,8 +1450,8 @@
to_chat(C, "<B>You are now an Artificer. You are incredibly weak and fragile, but you are able to construct new floors and walls, to break some walls apart, to repair allied constructs (by clicking on them), </B><I>and most important of all create new constructs</I><B> (Use your Artificer spell to summon a new construct shell and Summon Soulstone to create a new soulstone).</B>")
//ticker.mode.update_cult_icons_added(C.mind)
for(var/spell/S in C.spell_list)
if(S.charge_type & Sp_RECHARGE)
if(S.charge_counter == S.charge_max) //Spell is fully charged - let the proc handle everything
if(S.charge_type & SP_RECHARGE)
if(S.charge_counter == S.charge_cooldown_max) //Spell is fully charged - let the proc handle everything
S.take_charge()
else //Spell is on cooldown and already recharging - there's no need to call S.process(), just reset charges to 0
S.charge_counter = 0
Expand Down
4 changes: 2 additions & 2 deletions code/datums/gamemode/role/malf/malf_apcs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
/spell/aoe_turf/corereturn
name = "Return to Core"
panel = "Malfunction"
charge_type = Sp_CHARGES
charge_max = 1
charge_type = SP_CHARGES
charge_cooldown_max = 1 CHARGES
hud_state = "unshunt"

/spell/aoe_turf/corereturn/before_target(mob/user)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/gamemode/role/rambler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
name = "Lock in Vow"
desc = "Allows you to vow to another soul."
abbreviation = "LV"
charge_max = 100
charge_cooldown_max = 10 SECONDS
max_targets = 1
spell_flags = WAIT_FOR_CLICK
valid_targets = list(/mob/living)
Expand Down
12 changes: 6 additions & 6 deletions code/game/dna/genes/goon_disabilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,11 @@
panel = "Mutant Powers"
user_type = USER_TYPE_GENETIC

charge_type = Sp_RECHARGE
charge_max = 600
charge_type = SP_RECHARGE
charge_cooldown_max = 60 SECONDS

spell_flags = INCLUDEUSER
invocation_type = SpI_NONE
invocation_type = SP_INV_NONE
range = SELFCAST
max_targets = 1
selection_type = "range"
Expand Down Expand Up @@ -300,11 +300,11 @@
panel = "Mutant Powers"
user_type = USER_TYPE_GENETIC

charge_type = Sp_RECHARGE
charge_max = 200
charge_type = SP_RECHARGE
charge_cooldown_max = 20 SECONDS

spell_flags = INCLUDEUSER | STATALLOWED
invocation_type = SpI_NONE
invocation_type = SP_INV_NONE
range = SELFCAST
max_targets = 1
selection_type = "range"
Expand Down
30 changes: 15 additions & 15 deletions code/game/dna/genes/goon_powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@
desc = "Drops the body temperature of another person."
panel = "Mutant Powers"

charge_type = Sp_RECHARGE
charge_max = 600
charge_type = SP_RECHARGE
charge_cooldown_max = 60 SECONDS

spell_flags = WAIT_FOR_CLICK
invocation_type = SpI_NONE
invocation_type = SP_INV_NONE
range = 7
max_targets = 1
selection_type = "range"
Expand Down Expand Up @@ -212,10 +212,10 @@
user_type = USER_TYPE_GENETIC
panel = "Mutant Powers"

charge_type = Sp_RECHARGE
charge_max = 300
charge_type = SP_RECHARGE
charge_cooldown_max = 30 SECONDS

invocation_type = SpI_NONE
invocation_type = SP_INV_NONE
range = 1
max_targets = 1
selection_type = "view"
Expand Down Expand Up @@ -427,13 +427,13 @@
user_type = USER_TYPE_GENETIC
range = SELFCAST

charge_type = Sp_RECHARGE
charge_max = 60
charge_type = SP_RECHARGE
charge_cooldown_max = 6 SECONDS

spell_flags = INCLUDEUSER
invocation_type = SpI_NONE
invocation_type = SP_INV_NONE

duration = 10 //used for jump distance here
duration = 1 SECONDS //used for jump distance here

cast_sound = 'sound/weapons/thudswoosh.ogg'

Expand Down Expand Up @@ -547,10 +547,10 @@
desc = "Mimic the appearance of others!"
panel = "Mutant Powers"
user_type = USER_TYPE_GENETIC
charge_max = 1800
charge_cooldown_max = 180 SECONDS

spell_flags = 0
invocation_type = SpI_NONE
invocation_type = SP_INV_NONE
range = 1
max_targets = 1
selection_type = "range"
Expand Down Expand Up @@ -600,10 +600,10 @@
range = 7
max_targets = 1
spell_flags = SELECTABLE
invocation_type = SpI_NONE
invocation_type = SP_INV_NONE

charge_type = Sp_RECHARGE
charge_max = 100
charge_type = SP_RECHARGE
charge_cooldown_max = 10 SECONDS

valid_targets = list(/mob/living/carbon)

Expand Down
12 changes: 6 additions & 6 deletions code/game/dna/genes/powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
desc = "Lets you see through the eyes of others."
panel = "Mutant Powers"

charge_type = Sp_RECHARGE
charge_max = 50
charge_type = SP_RECHARGE
charge_cooldown_max = 5 SECONDS

invocation_type = SpI_NONE
invocation_type = SP_INV_NONE
range = GLOBALCAST
max_targets = 1
spell_flags = SELECTABLE | TALKED_BEFORE
Expand Down Expand Up @@ -124,9 +124,9 @@
name = "Telepathy"
desc = "Speak into the minds of others. You must either hear them speak or examine them to make contact."
panel = "Mutant Powers"
charge_type = Sp_RECHARGE
charge_max = 0
invocation_type = SpI_NONE
charge_type = SP_RECHARGE
charge_cooldown_max = 0
invocation_type = SP_INV_NONE
range = GLOBALCAST //the world
max_targets = 1
selection_type = "view"
Expand Down
12 changes: 6 additions & 6 deletions code/game/dna/genes/vg_powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ Obviously, requires DNA2.
user_type = USER_TYPE_GENETIC
range = SELFCAST

charge_type = Sp_RECHARGE
charge_max = HULK_COOLDOWN
charge_type = SP_RECHARGE
charge_cooldown_max = HULK_COOLDOWN

duration = HULK_DURATION

spell_flags = INCLUDEUSER

invocation_type = SpI_NONE
invocation_type = SP_INV_NONE

override_base = "genetic"
hud_state = "gen_hulk"
Expand Down Expand Up @@ -127,9 +127,9 @@ Obviously, requires DNA2.
user_type = USER_TYPE_GENETIC
panel = "Mutant Powers"
range = SELFCAST
charge_type = Sp_RECHARGE
charge_max = 50
invocation_type = SpI_NONE
charge_type = SP_RECHARGE
charge_cooldown_max = 5 SECONDS
invocation_type = SP_INV_NONE
spell_flags = INCLUDEUSER
override_base = "genetic"
hud_state = "wiz_sleepold"
Expand Down
6 changes: 3 additions & 3 deletions code/game/gamemodes/wizard/artefact.dm
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,9 @@

user_type = USER_TYPE_ARTIFACT

charge_type = Sp_RECHARGE
charge_max = 30 SECONDS
invocation_type = SpI_SHOUT
charge_type = SP_RECHARGE
charge_cooldown_max = 30 SECONDS
invocation_type = SP_INV_SHOUT
invocation = "FA'R N' AL'ENC'ED"
range = 0
spell_flags = NEEDSCLOTHES | NEEDSHUMAN
Expand Down
Loading
Loading