forked from KristalTeam/EnemyRecreations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod.lua
91 lines (76 loc) · 2.17 KB
/
mod.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Mod.PARTY_MEMBERS = {"kris", "susie", "ralsei", "noelle", "greenkris"}
Mod.ENEMIES = {"rudinn", "hathy", "werewire", "tasque", "virovirokun"}
Mod.BATTLER_COLORS = {
["kris"] = {0.12, 0.16, 0.8},
["susie"] = {0.87, 0, 0.43},
["ralsei"] = {0.11, 1, 0.3},
["noelle"] = {0.93, 1, 0},
["rudinn"] = {0.34, 1, 0.81},
["hathy"] = {0.11, 1, 0.3},
["werewire"] = {0.93, 1, 0},
["tasque"] = {0, 0.63, 1},
["virovirokun"] = {0.22, 0, 0.5},
["greenkris"] = {0, 1, 0.55},
["unknown"] = {0.1, 0.1, 0.1}
}
Mod.BATTLER_OFFSETS = {
["kris"] = {0, 26},
["susie"] = {0, 29},
["ralsei"] = {-3, 26},
["noelle"] = {0, 26},
["rudinn"] = {2, 21},
["hathy"] = {0, 30},
["virovirokun"] = {0, 31},
["tasque"] = {0, 25},
["werewire"] = {0, 46},
["greenkris"] = {0, 26},
["unknown"] = {0, 20},
}
Mod.SPECIAL_ENCOUNTERS = {
-- Accurate placements, fight tutorial
["werewire"] = {
["werewire"] = 2
},
-- Accurate placements
["tasque"] = {
["tasque"] = 2
},
["virovirokun"] = {
["virovirokun"] = 2
},
--Glowshard / Manual support
["rudinn"] = {
["rudinn"] = 1
},
["viro_rudinn"] = {
["virovirokun"] = 1,
["rudinn"] = 1
}
}
Mod.greyscale_shader = love.graphics.newShader([[
uniform float factor;
uniform float brightness;
vec4 effect(vec4 color, Image tex, vec2 texture_coords, vec2 screen_coords) {
vec4 sample = Texel(tex, texture_coords);
float gray = 0.21 * sample.r + 0.71 * sample.g + 0.07 * sample.b;
return vec4((sample.rgb * (1.0 - factor) + (gray * factor)) * brightness, sample.a);
}
]])
Mod.greyscale_shader:send("factor", 1)
Mod.greyscale_shader:send("brightness", 1)
function Mod:init()
self.battle_select = BattleSelectScreen()
end
function Mod:postInit()
Game.state = "BATTLESELECT"
Game.stage:addChild(self.battle_select)
end
function Mod:preUpdate()
if Game.state == "BATTLESELECT" then
self.battle_select.active = true
self.battle_select.visible = true
else
self.battle_select.active = false
self.battle_select.visible = false
end
end