Skip to content

Commit

Permalink
Init files
Browse files Browse the repository at this point in the history
  • Loading branch information
XcantloadX committed Jun 6, 2019
1 parent 8e32074 commit 9c69808
Show file tree
Hide file tree
Showing 92 changed files with 11,658 additions and 0 deletions.
Empty file.
45 changes: 45 additions & 0 deletions ChineseExampleMod/Lua/Encounters/encounter.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
-- A basic encounter script skeleton you can copy and modify for your own creations.

-- music = "shine_on_you_crazy_diamond" --Always OGG. Extension is added automatically. Remove the first two lines for custom music.
encountertext = "Poseur 摆了一个姿势!" --Modify as necessary. It will only be read out in the action select screen.
nextwaves = {"bullettest_chaserorb"}
wavetimer = 4.0
arenasize = {155, 130}

enemies = {
"poseur"
}

enemypositions = {
{0, 0}
}

-- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
possible_attacks = {"bullettest_bouncy", "bullettest_chaserorb", "bullettest_touhou"}

function EncounterStarting()
-- If you want to change the game state immediately, this is the place.
end

function EnemyDialogueStarting()
-- Good location for setting monster dialogue depending on how the battle is going.
enemies[1].SetVar('currentdialogue', {"It's\n测试测试测试working."})
end

function EnemyDialogueEnding()
-- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
-- This example line below takes a random attack from 'possible_attacks'.
nextwaves = { possible_attacks[math.random(#possible_attacks)] }
end

function DefenseEnding() --This built-in function fires after the defense round ends.
encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
end

function HandleSpare()
State("ENEMYDIALOGUE")
end

function HandleItem(ItemID)
BattleDialog({"你选择了物品 " .. ItemID .. ""})
end
35 changes: 35 additions & 0 deletions ChineseExampleMod/Lua/Monsters/poseur.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
-- A basic monster script skeleton you can copy and modify for your own creations.
comments = {"闻起来像敌人。", "Poseur 摆着姿势\n就好像他的生活依靠于摆姿势。", "Poseur 的四肢不应该\n以这种方式移动。"}
commands = {"行动 1", "行动 2", "行动 3"}
randomdialogue = {"Random\nDialogue\n1.", "Random\nDialogue\n2.", "Random\nDialogue\n3."}

sprite = "poseur" --Always PNG. Extension is added automatically.
name = "Poseur"
hp = 100
atk = 1
def = 1
check = "这里是检查信息~"
dialogbubble = "right" -- See documentation for what bubbles you have available.
canspare = false
cancheck = true

-- Happens after the slash animation but before
function HandleAttack(attackstatus)
if attackstatus == -1 then
-- player pressed fight but didn't press Z afterwards
else
-- player did actually attack
end
end

-- This handles the commands; all-caps versions of the commands list you have above.
function HandleCustomCommand(command)
if command == "行动 1" then
currentdialogue = {"Selected\nAct 1."}
elseif command == "行动 2" then
currentdialogue = {"Selected\nAct 2."}
elseif command == "行动 3" then
currentdialogue = {"Selected\nAct 3."}
end
BattleDialog({"你选择了 " .. command .. ""})
end
32 changes: 32 additions & 0 deletions ChineseExampleMod/Lua/Waves/bullettest_bouncy.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
-- The bouncing bullets attack from the documentation example.
spawntimer = 0
bullets = {}

function Update()
spawntimer = spawntimer + 1
if spawntimer%30 == 0 then
local posx = 30 - math.random(60)
local posy = Arena.height/2
local bullet = CreateProjectile('bullet', posx, posy)
bullet.SetVar('velx', 1 - 2*math.random())
bullet.SetVar('vely', 0)
table.insert(bullets, bullet)
end

for i=1,#bullets do
local bullet = bullets[i]
local velx = bullet.GetVar('velx')
local vely = bullet.GetVar('vely')
local newposx = bullet.x + velx
local newposy = bullet.y + vely
if(bullet.x > -Arena.width/2 and bullet.x < Arena.width/2) then
if(bullet.y < -Arena.height/2 + 8) then
newposy = -Arena.height/2 + 8
vely = 4
end
end
vely = vely - 0.04
bullet.MoveTo(newposx, newposy)
bullet.SetVar('vely', vely)
end
end
14 changes: 14 additions & 0 deletions ChineseExampleMod/Lua/Waves/bullettest_chaserorb.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- The chasing attack from the documentation example.
chasingbullet = CreateProjectile('bullet', Arena.width/2, Arena.height/2)
chasingbullet.SetVar('xspeed', 0)
chasingbullet.SetVar('yspeed', 0)

function Update()
local xdifference = Player.x - chasingbullet.x
local ydifference = Player.y - chasingbullet.y
local xspeed = chasingbullet.GetVar('xspeed') / 2 + xdifference / 100
local yspeed = chasingbullet.GetVar('yspeed') / 2 + ydifference / 100
chasingbullet.Move(xspeed, yspeed)
chasingbullet.SetVar('xspeed', xspeed)
chasingbullet.SetVar('yspeed', yspeed)
end
38 changes: 38 additions & 0 deletions ChineseExampleMod/Lua/Waves/bullettest_touhou.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
-- You've seen this one in the trailer (if you've seen the trailer).
spawntimer = 0
bullets = {}
yOffset = 180
mult = 0.5

function Update()
spawntimer = spawntimer + 1
if(spawntimer % 30 == 0) then
local numbullets = 10
for i=1,numbullets+1 do
local bullet = CreateProjectile('bullet', 0, yOffset)
bullet.SetVar('timer', 0)
bullet.SetVar('offset', math.pi * 2 * i / numbullets)
bullet.SetVar('negmult', mult)
bullet.SetVar('lerp', 0)
table.insert(bullets, bullet)
end
mult = mult + 0.05
end

for i=1,#bullets do
local bullet = bullets[i]
local timer = bullet.GetVar('timer')
local offset = bullet.GetVar('offset')
local lerp = bullet.GetVar('lerp')
local neg = 1
local posx = (70*lerp)*math.sin(timer*bullet.GetVar('negmult') + offset)
local posy = (70*lerp)*math.cos(timer + offset) + yOffset - lerp*50
bullet.MoveTo(posx, posy)
bullet.SetVar('timer', timer + 1/40)
lerp = lerp + 1 / 90
if lerp > 4.0 then
lerp = 4.0
end
bullet.SetVar('lerp', lerp)
end
end
Binary file not shown.
Binary file added ChineseExampleMod/Sprites/UI/Buttons/actbt_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ChineseExampleMod/Sprites/UI/Buttons/actbt_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ChineseExampleMod/Sprites/UI/Buttons/itembt_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ChineseExampleMod/Sprites/UI/Fonts/monster.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9c69808

Please sign in to comment.