Skip to content

Commit

Permalink
Merge pull request #333 from SadDiamondMan/main
Browse files Browse the repository at this point in the history
cheebs burbur
  • Loading branch information
BrendaK7200 authored Mar 4, 2025
2 parents 59e036d + f2fbe2d commit f94e3bd
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 10 deletions.
Binary file added assets/sprites/ui/battle/msg/half-cify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion data/items/weapons/swords/the_angels_bane.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ function item:init()
self.instant = false

self.bonuses = {
attack = 0,
attack = 10,
magic = 10,
}

self.bonus_name = "Night"
Expand Down
6 changes: 3 additions & 3 deletions data/party/hero.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ function character:init()
self.soul_facing = "up"

self.has_act = true
self.has_spells = false

self.has_xact = true
self.has_spells = true
self.has_xact = false
self.xact_name = "H-Action"
self:addSpell("half-cify")

self.health = 90

Expand Down
14 changes: 8 additions & 6 deletions data/party/suzy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ function character:init()

self.stats = {
health = 110,
attack = 14,
attack = 10,
defense = 2,
magic = 1
magic = 4
}
self.max_stats = {}

Expand All @@ -54,18 +54,19 @@ function character:init()
magic = 5
}

self.color = {1, 0, 1}
self.color = {106/255, 13/255, 173/255}

self.dmg_color = {0.8, 0.6, 0.8}

self.attack_bar_color = {234/255, 121/255, 200/255}
self.attack_bar_color = self.color

self.attack_box_color = {0.5, 0, 0.5}
self.attack_box_color = {0.6, 0.2, 0.6}

self.xact_color = {1, 0.5, 1}
self.xact_color = {0.7, 0.3, 0.8}

self.menu_icon = "party/susie/head"
self.head_icons = "party/susie/icon"
self.name_sprite = "party/suzy/name"

self.attack_sprite = "effects/attack/mash"
self.attack_sound = "laz_c"
Expand All @@ -80,6 +81,7 @@ function character:init()
self.gameover_message = nil

self:addSpell("tattle")
self:addSpell("half-cify")
end

-- add later:
Expand Down
71 changes: 71 additions & 0 deletions data/spells/half-cify.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
local spell, super = Class(Spell, "half-cify")

function spell:init()
super.init(self)

self.name = "Half-cify"

self.cast_name = nil

self.effect = "Spare\nTIRED foe"

self.description = "SPARE a tired enemy by putting them to sleep."

self.cost = 0

-- Target mode (ally, party, enemy, enemies, or none)
self.target = "enemy"
self.tags = {"spare_tired"}
end

function spell:getCastMessage(user, target)
local message = super.getCastMessage(self, user, target)
if target.tired then
if target.half_pacify == true then
return message
else
return message.."\n* [color:blue]Pacify[color:reset] level is now at [color:blue]50%[color:reset]!"
end
elseif target.mercy < 100 then
return message.."\n[wait:0.25s]* But the enemy wasn't [color:blue]TIRED[color:reset]..."
else
return message.."\n[wait:0.25s]* But the foe wasn't [color:blue]TIRED[color:reset]... try\n[color:yellow]SPARING[color:reset]!"
end
end

function spell:onCast(user, target)
if target.tired then
if target.half_pacify == true then
Assets.playSound("spell_pacify")

target:spare(true)

local pacify_x, pacify_y = target:getRelativePos(target.width/2, target.height/2)
local z_count = 0
local z_parent = target.parent
Game.battle.timer:every(1/15, function()
z_count = z_count + 1
local z = SpareZ(z_count * -40, pacify_x, pacify_y)
z.layer = target.layer + 0.002
z_parent:addChild(z)
end, 8)
else
target:statusMessage("msg", "half-cify")
Assets.playSound("spell_pacify", 1, 2)
target.half_pacify = true
end
else
local recolor = target:addFX(RecolorFX())
Game.battle.timer:during(8/30, function()
recolor.color = Utils.lerp(recolor.color, {0, 0, 1}, 0.12 * DTMULT)
end, function()
Game.battle.timer:during(8/30, function()
recolor.color = Utils.lerp(recolor.color, {1, 1, 1}, 0.16 * DTMULT)
end, function()
target:removeFX(recolor)
end)
end)
end
end

return spell
4 changes: 4 additions & 0 deletions mods/dpr_main/scripts/world/cutscenes/tower_outside.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ return {
cutscene:showNametag("Lazul", {color = {0, 0, 1, 1}})
cutscene:text("[color:blue]* In case you forgot the bin code:[wait:5] The code is [color:yellow]00000000[color:blue].")
cutscene:hideNametag()
elseif quest and quest > 1 then
cutscene:showNametag("Lazul", {color = {0, 0, 1, 1}})
cutscene:text("[color:blue]* We have nothing to discuss.")
cutscene:hideNametag()
else
cutscene:showNametag("Lazul", {color = {0, 0, 1, 1}})
cutscene:text("[color:blue]* Hey![wait:5] Do you happen to be a delivery man?[wait:5] No?[wait:5] Good.")
Expand Down

0 comments on commit f94e3bd

Please sign in to comment.