Skip to content

Commit

Permalink
Update to Oozaru 0.7.0
Browse files Browse the repository at this point in the history
Because the pig decided it's hungry for Abby.
  • Loading branch information
fatcerberus committed Dec 18, 2024
1 parent cd5e9bc commit d98e80a
Show file tree
Hide file tree
Showing 78 changed files with 599 additions and 374 deletions.
2 changes: 1 addition & 1 deletion dist/artifacts.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/data/titleScreen.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"titleScreen": "images/titleScreen.png",
"music": "music/titleTheme.ogg",
"menuText": "DEMO",
"menuText": "main menu",
"musicOverSplash": true,
"persistBGM": false,
"splashFadeFrames": 60,
"titleFadeFrames": 120,
"splashScreens": [
{ "fileName": "logos/sphere.png", "holdFrames": 180 },
{ "fileName": "logos/spectaclesBS.png", "holdFrames": 180 }
{ "fileName": "logos/splashScreen.png", "holdFrames": 180 }
]
}
2 changes: 1 addition & 1 deletion dist/game.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":2,"apiLevel":4,"name":"Spectacles: Bruce's Story","author":"Fat Cerberus","summary":"Follow Scott Starcross in his quest to stop the Primus from destroying both worlds.","resolution":"320x240","main":"scripts/main.js","saveID":"Spectacles Saga"}
{"version":2,"apiLevel":4,"name":"Spectacles: Bruce's Story","author":"Where'd She Go? Productions","summary":"Follow Scott Starcross in his quest to stop the Primus from, um... what does the Primus do again?","resolution":"320x240","main":"scripts/main.js","saveID":"Spectacles Saga"}
4 changes: 2 additions & 2 deletions dist/game.sgm
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version=2
api=4
name=Spectacles: Bruce's Story
author=Fat Cerberus
description=Follow Scott Starcross in his quest to stop the Primus from destroying both worlds.
author=Where'd She Go? Productions
description=Follow Scott Starcross in his quest to stop the Primus from, um... what does the Primus do again?
saveID=Spectacles Saga
resolution=320x240
main=scripts/main.js
Binary file removed dist/logos/spectaclesBS.png
Binary file not shown.
Binary file added dist/logos/splashScreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions dist/scripts/autoBattlers/beverly.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/**
* Specs Engine: the Spectacles Saga game engine
* Copyright © 2012-2024 Where'd She Go? Productions
* All rights reserved.
**/

// Beverly movepool:
// - Munch
// - Fat Slam
// - 10.5
// - Knock Back

import { from, Random, Scene } from 'sphere-runtime';

import { AutoBattler, Stance } from '../battleSystem/index.js';

export default
class BeverlyAI extends AutoBattler
{
constructor(unit, battle)
{
super(unit, battle);

this.defaultSkill = 'upheaval';

this.talkCount = 0;
}

strategize()
{
if (Random.chance(0.25))
this.queueSkill('fatSlam');
}

async on_phaseChanged(newPhase, lastPhase)
{
switch (newPhase) {
case 1:
this.queueSkill('tenPointFive');
break;
}
}

on_skillUsed(userID, skillID, stance, targetIDs)
{

}

on_unitDamaged(unit, amount, tags, actingUnit)
{
if (unit === this.unit && actingUnit !== null) {
if (from(tags).anyIs('fire'))
this.queueSkill('knockBack', Stance.Normal, actingUnit.id);
}
}

async on_unitReady(unitID)
{
if (unitID === 'beverly') {
switch (++this.talkCount) {
case 1:
await new Scene()
.talk("Beverly", true, 1.0, Infinity,
"Funny thing about the rats in Malmagma Manor...",
"They don't tend to last very long around here for one reason or another. They disappear, and you know, nobody's really sure why!")
.run();
break;
case 2:
await new Scene()
.talk("Beverly", true, 1.0, Infinity, "Of course, if I had to guess...")
.run();
this.queueSkill('munch', Stance.Normal, 'lauren');
break;
}
}
}
}
19 changes: 10 additions & 9 deletions dist/scripts/autoBattlers/headlessHorse.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/***
* Specs Engine v6: Spectacles Saga Game Engine
* Copyright (c) 2023 Fat Cerberus
***/
/**
* Specs Engine: the Spectacles Saga game engine
* Copyright © 2012-2024 Where'd She Go? Productions
* All rights reserved.
**/

import { from, Random } from 'sphere-runtime';

Expand All @@ -27,7 +28,7 @@ class HeadlessHorseAI extends AutoBattler
{
switch (this.phase) {
case 1: {
let hellfireTurns = this.predictSkillTurns('hellfire');
const hellfireTurns = this.predictSkillTurns('hellfire');
if (!this.unit.hasStatus('ignite')) {
this.queueSkill('hellfire', 'headlessHorse');
if (from(hellfireTurns).any(it => it.unit.id === 'elysia'))
Expand All @@ -42,7 +43,7 @@ class HeadlessHorseAI extends AutoBattler
if (this.spectralDrawPending) {
this.ghostTargetID = null;
let maxValue = 0;
for (let unitID in this.damageTaken) {
for (const unitID in this.damageTaken) {
if (this.damageTaken[unitID] > maxValue) {
this.ghostTargetID = unitID;
maxValue = this.damageTaken[unitID];
Expand Down Expand Up @@ -80,7 +81,7 @@ class HeadlessHorseAI extends AutoBattler
on_skillUsed(userID, skillID, stance, targetIDs)
{
if (from(targetIDs).anyIs('headlessHorse')) {
let iceSkills = [ 'chillShot', 'chill', 'windchill' ];
const iceSkills = [ 'chillShot', 'chill', 'windchill' ];
if (from(iceSkills).anyIs(skillID) && (this.unit.hasStatus('ignite') || this.unit.hasStatus('rearing')))
this.trampleTarget = userID;
}
Expand Down Expand Up @@ -110,7 +111,7 @@ class HeadlessHorseAI extends AutoBattler
on_unitTargeted(unit, action, actingUnit)
{
if (unit === this.unit) {
let isPhysical = from(action.effects)
const isPhysical = from(action.effects)
.where(it => it.type === 'damage')
.any(it => it.damageType === 'physical' || it.element === 'earth');
if (isPhysical && this.unit.hasStatus('rearing')) {
Expand All @@ -119,7 +120,7 @@ class HeadlessHorseAI extends AutoBattler
else if (this.trampleTarget !== null)
this.trampleTarget = actingUnit.id;
}
let isMagic = from(action.effects)
const isMagic = from(action.effects)
.where(it => it.type === 'damage')
.any(it => it.damageType === 'magic');
if (isMagic && this.unit.hasStatus('ghost') && actingUnit.id != this.ghostTargetID)
Expand Down
9 changes: 5 additions & 4 deletions dist/scripts/autoBattlers/robert2.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/***
* Specs Engine v6: Spectacles Saga Game Engine
* Copyright (c) 2023 Fat Cerberus
***/
/**
* Specs Engine: the Spectacles Saga game engine
* Copyright © 2012-2024 Where'd She Go? Productions
* All rights reserved.
**/

import { from, Random, Scene } from 'sphere-runtime';

Expand Down
9 changes: 5 additions & 4 deletions dist/scripts/autoBattlers/scottTemple.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/***
* Specs Engine v6: Spectacles Saga Game Engine
* Copyright (c) 2023 Fat Cerberus
***/
/**
* Specs Engine: the Spectacles Saga game engine
* Copyright © 2012-2024 Where'd She Go? Productions
* All rights reserved.
**/

import { from, Random } from 'sphere-runtime';

Expand Down
9 changes: 5 additions & 4 deletions dist/scripts/autoBattlers/starcross.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/***
* Specs Engine v6: Spectacles Saga Game Engine
* Copyright (c) 2023 Fat Cerberus
***/
/**
* Specs Engine: the Spectacles Saga game engine
* Copyright © 2012-2024 Where'd She Go? Productions
* All rights reserved.
**/

import { from, Random } from 'sphere-runtime';

Expand Down
9 changes: 5 additions & 4 deletions dist/scripts/autoColorMask.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/***
* Specs Engine v6: Spectacles Saga Game Engine
* Copyright (c) 2023 Fat Cerberus
***/
/**
* Specs Engine: the Spectacles Saga game engine
* Copyright © 2012-2024 Where'd She Go? Productions
* All rights reserved.
**/

import { Prim, Scene, Task } from 'sphere-runtime';

Expand Down
15 changes: 8 additions & 7 deletions dist/scripts/battleSystem/autoBattler.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/***
* Specs Engine v6: Spectacles Saga Game Engine
* Copyright (c) 2023 Fat Cerberus
***/
/**
* Specs Engine: the Spectacles Saga game engine
* Copyright © 2012-2024 Where'd She Go? Productions
* All rights reserved.
**/

import { from, Random } from 'sphere-runtime';

Expand Down Expand Up @@ -84,7 +85,7 @@ class AutoBattler
this.allies[ally.id] = ally;
}
this.targets = null;
this.updatePhase();
await this.updatePhase();
if (this.moveQueue.length == 0)
await this.strategize();
if (this.moveQueue.length == 0) {
Expand Down Expand Up @@ -248,7 +249,7 @@ class AutoBattler
throw new Error("AI has no strategy");
}

updatePhase()
async updatePhase()
{
let phaseToEnter = 1;
if (this.phasePoints !== null) {
Expand All @@ -262,7 +263,7 @@ class AutoBattler
console.log(
`${this.unit.name} is entering Phase ${this.currentPhase}`,
`prev: ${lastPhase > 0 ? lastPhase : "none"}`);
this.on_phaseChanged(this.currentPhase, lastPhase);
await this.on_phaseChanged(this.currentPhase, lastPhase);
}
}

Expand Down
9 changes: 5 additions & 4 deletions dist/scripts/battleSystem/battleActor.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/***
* Specs Engine v6: Spectacles Saga Game Engine
* Copyright (c) 2023 Fat Cerberus
***/
/**
* Specs Engine: the Spectacles Saga game engine
* Copyright © 2012-2024 Where'd She Go? Productions
* All rights reserved.
**/

import { from, Scene } from 'sphere-runtime';

Expand Down
Loading

0 comments on commit d98e80a

Please sign in to comment.