You've already forked FullScreenPokemon
mirror of
https://github.com/FullScreenShenanigans/FullScreenPokemon.git
synced 2026-04-28 12:58:40 -07:00
WIP: 'airplane'
This commit is contained in:
@@ -16,6 +16,7 @@ import { Collisions } from "./components/Collisions";
|
||||
import { Constants } from "./components/Constants";
|
||||
import { Cutscenes } from "./components/Cutscenes";
|
||||
import { Cycling } from "./components/Cycling";
|
||||
import { Death } from "./components/Death";
|
||||
import { Equations } from "./components/Equations";
|
||||
import { Evolution } from "./components/Evolution";
|
||||
import { Experience } from "./components/Experience";
|
||||
@@ -168,6 +169,12 @@ export class FullScreenPokemon extends EightBittr {
|
||||
@component(Cycling)
|
||||
public readonly cycling: Cycling<this>;
|
||||
|
||||
/**
|
||||
* Removes Things from the game.
|
||||
*/
|
||||
@component(Death)
|
||||
public readonly death: Death<this>;
|
||||
|
||||
/**
|
||||
* Common equations.
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import { Death as EightBittrDeath } from "eightbittr";
|
||||
|
||||
import { FullScreenPokemon } from "../FullScreenPokemon";
|
||||
|
||||
import { IThing } from "./Things";
|
||||
|
||||
/**
|
||||
* Removes Things from the game.
|
||||
*/
|
||||
export class Death<TEightBittr extends FullScreenPokemon> extends EightBittrDeath<TEightBittr> {
|
||||
/**
|
||||
* Generically kills all Things.
|
||||
*/
|
||||
public killAll() {
|
||||
this.eightBitter.groupHolder.callOnAll((thing: IThing) => {
|
||||
this.killNormal(thing);
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -60,10 +60,7 @@ export class Gameplay<TEightBittr extends FullScreenPokemon> extends EightBittrG
|
||||
*/
|
||||
public startIntro(): void {
|
||||
this.eightBitter.saves.clearSavedData();
|
||||
this.eightBitter.scenePlayer.startCutscene("Intro", {
|
||||
disablePauseMenu: true,
|
||||
});
|
||||
|
||||
this.eightBitter.scenePlayer.startCutscene("Intro");
|
||||
this.eightBitter.modAttacher.fireEvent(this.eightBitter.mods.eventNames.onGameStartIntro);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { component } from "babyioc";
|
||||
import { Graphics as EightBittrGraphics } from "eightbittr";
|
||||
import { IPalette } from "pixelrendr";
|
||||
import { IPalette, IFilterContainer } from "pixelrendr";
|
||||
|
||||
import { FullScreenPokemon } from "../FullScreenPokemon";
|
||||
|
||||
@@ -11,6 +11,19 @@ import { graphicsLibrary } from "./graphics/GraphicsLibrary";
|
||||
* Changes the visual appearance of Things.
|
||||
*/
|
||||
export class Graphics<TEightBittr extends FullScreenPokemon> extends EightBittrGraphics<TEightBittr> {
|
||||
/**
|
||||
* Filters that may be used by sprites in the library.
|
||||
*/
|
||||
public readonly filters: IFilterContainer = {
|
||||
BlackAndWhite: [
|
||||
"palette",
|
||||
{
|
||||
"3": "2",
|
||||
"4": "2",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
/**
|
||||
* What class name should indicate a Thing is to be flipped verticallu.
|
||||
*/
|
||||
|
||||
@@ -44,26 +44,26 @@ export class Fading<TEightBittr extends FullScreenPokemon> extends GeneralCompon
|
||||
* @param onCompletion A callback for when the attribute reaches the goal.
|
||||
* @returns The in-progress TimeEvent, if started.
|
||||
*/
|
||||
public animateFadeAttribute(
|
||||
thing: IThing,
|
||||
attribute: string,
|
||||
public animateFadeAttribute<TThing extends IThing>(
|
||||
thing: TThing,
|
||||
attribute: keyof TThing,
|
||||
change: number,
|
||||
goal: number,
|
||||
speed: number,
|
||||
onCompletion?: (thing: IThing) => void): ITimeEvent | undefined {
|
||||
(thing as any)[attribute] += change;
|
||||
(thing[attribute] as number) += change;
|
||||
|
||||
if (change > 0) {
|
||||
if ((thing as any)[attribute] >= goal) {
|
||||
(thing as any)[attribute] = goal;
|
||||
if (thing[attribute] >= goal) {
|
||||
(thing[attribute] as number) = goal;
|
||||
if (typeof onCompletion === "function") {
|
||||
onCompletion(thing);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
} else {
|
||||
if ((thing as any)[attribute] <= goal) {
|
||||
(thing as any)[attribute] = goal;
|
||||
if (thing[attribute] <= goal) {
|
||||
(thing[attribute] as number) = goal;
|
||||
if (typeof onCompletion === "function") {
|
||||
onCompletion(thing);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -532,7 +532,10 @@ export const graphicsLibrary = {
|
||||
PlayerPortrait: "p[1,2,3,4]x012,31113x018,3113332211x014,31x36,22221x012,133311332322223x010,1333100133232221x09,133310330123232223x08,133310330132323221x09,33331001333232321x09,13333110000x35,1x010,333x08,23331x010,1x08,22x15,x09,1x05,222211331003x08,1x25,111330100201x09,x15,333220100301x011,12223202200101x012,1x28,0011x014,1322312001x017,113222111x015,313311131321x012,312133312201323x010,12221131222013211x08,1222300x15,3331001x06,100230003x17,0010300001000010003x15,00001010003x05,1000x16,00030003001220230000x16,00030001032231310003x15,30001000101230021000x16,00001000030110221300x16,00001200010012221033x16,00001220010001313100x16,3333x25,1x05,133111031110000122211x06,13311110031111311121x06,1313331x36,1111221x07,113331x36,1003111x08,1x310,1011331x07,3133331133331133111x07,x36,1x35,1123331x07,133331013333101033x08,13333101333310011x09,1232310132321x013,13233101232333x012,32333300123231x011,123231000132331x011,133331000123231x011,133331000133331x05,",
|
||||
PlayerSilhouetteSmall: "p[0,1,2]x05,2222x08,22111122x05,2x18,200002x18,20002x110,2002x110,2002x110,20002x18,200002x18,2x05,2x16,2x05,22x16,220002x110,2002x110,202x112,22112x16,21120222x16,22200002x16,2x05,2x18,2000021112211120000211122111200021112002111200211120021112000222000022200",
|
||||
PlayerSilhouetteLarge: "p[0,1,2]x09,2222x016,22111122x013,2x18,2x012,2x18,2x011,2x110,2x010,2x110,2x010,2x110,2x010,2x110,2x010,2x110,2x011,2x18,2x012,2x18,2x013,22111122x015,211112x014,22x16,22x011,2x110,2x09,2x112,2x07,2x114,2x06,2x114,2x05,21112x18,21112000021122x18,221120002111202x16,2021112002112022x16,220211200211202x18,2021120211112x110,211112211122x110,2211120x25,x110,x25,x06,211112211112x09,2x15,22x15,2x08,2x15,22x15,2x08,2x15,22x15,2x08,21111200211112x07,2x15,2002x15,2x06,2x15,2002x15,2x06,2111120000211112x07,21112000021112x08,2112x06,2112x06,221112x06,2111220002x16,200002x16,2002x16,200002x16,2000x26,x06,x26,00",
|
||||
OakPortrait: "p[0,1,2,3,4]x07,240002x022,211222122224x018,2x110,224x012,44411133x19,2x012,23313333x18,34x012,23342241124224312x011,433433132121112132x012,232311132x15,212x013,223113x17,232x013,422214141112222x013,41122243232222412x012,21214121122141412x012,21214421112431412x013,2241142x16,22x015,2211331113112x017,21322221414x019,234111242x019,22241114222x016,22311x25,1212x013,223311222311121122x010,2222311x27,1114124x08,211122122x15,21141114x07,2221112111x25,4441112x06,2244x27,4444244x15,4x05,2124242112x45,21141114200004112212112x46,211141412000021122121222244442114112120004x26,x15,3244421141121140021111211112224444214111211204x15,231111244222214111211202x15,222111222112141111211202x16,22232x15,23411112111202x15,x25,x15,23x15,2111200x25,3322x16,23x15,23112000021122122211222x16,2332x05,2x15,24222242x16,2332x05,2x15,22211222111144232x05,41441112442244221141112x06,21114112442444421141112x06,21114112442444421141112x06,21114112422444421141112x06,21114112444244421141112x06,21114112442024421141112x06,24114112442024421141142x06,21444112442024421144412x06,2x15,2443202442x16,2x07,221112433202442111122x09,x25,43200024x26,x010,244443320002x46,2x010,2444333200024443332x010,2444433200024332242x09,2422244442002x47,2x08,x28,420233x26,4x08,231112112000222311122x08,2x35,22x05,23333112x09,x25,x08,x26,",
|
||||
OakPortrait: {
|
||||
normal: "p[0,1,2,3,4]x07,240002x022,211222122224x018,2x110,224x012,44411133x19,2x012,23313333x18,34x012,23342241124224312x011,433433132121112132x012,232311132x15,212x013,223113x17,232x013,422214141112222x013,41122243232222412x012,21214121122141412x012,21214421112431412x013,2241142x16,22x015,2211331113112x017,21322221414x019,234111242x019,22241114222x016,22311x25,1212x013,223311222311121122x010,2222311x27,1114124x08,211122122x15,21141114x07,2221112111x25,4441112x06,2244x27,4444244x15,4x05,2124242112x45,21141114200004112212112x46,211141412000021122121222244442114112120004x26,x15,3244421141121140021111211112224444214111211204x15,231111244222214111211202x15,222111222112141111211202x16,22232x15,23411112111202x15,x25,x15,23x15,2111200x25,3322x16,23x15,23112000021122122211222x16,2332x05,2x15,24222242x16,2332x05,2x15,22211222111144232x05,41441112442244221141112x06,21114112442444421141112x06,21114112442444421141112x06,21114112422444421141112x06,21114112444244421141112x06,21114112442024421141112x06,24114112442024421141142x06,21444112442024421144412x06,2x15,2443202442x16,2x07,221112433202442111122x09,x25,43200024x26,x010,244443320002x46,2x010,2444333200024443332x010,2444433200024332242x09,2422244442002x47,2x08,x28,420233x26,4x08,231112112000222311122x08,2x35,22x05,23333112x09,x25,x08,x26,",
|
||||
shady: ["filter", ["Scenery", "OakPortrait", "normal"], "BlackAndWhite"],
|
||||
},
|
||||
RivalPortrait: "p[0,1,2,3,4]x07,224x027,2424x026,2442x026,24424x020,4222x45,2024x014,22x410,2332x011,42x412,33332x09,24422x48,x37,4x07,202212x49,x36,2x011,2x45,2444243424442x09,2x45,244423242122442x07,x46,224423332212144424x05,24444232442333221412444420002x45,2232423323323112422000022244213224342123232222x08,242213123331121121112x08,2420231233311212214112x08,2002x38,123321112x011,2x36,23112223112x012,243322311211122212x013,24333241111233114x014,224211222123112x011,2222331221112233114x08,2232333312x15,323112x07,2133342224x16,3233114x06,24343333112211113343332x07,2323311121121122423332x07,212111121441220002222x07,4x17,214412x015,214x16,21122x015,212x17,2232x014,4112x18,32x015,2112333x26,x016,23332221411112x014,433321141144442x014,223322221141112x015,42244422144442x015,21244424x26,x015,212x410,2x016,4244422x47,x015,x46,22x45,2x015,2x45,20x45,2x015,24444200244442x015,23434200243432x015,233442000333444x014,434444000234342x013,2343420000243442x013,2444420000234342x013,x46,x05,44442x013,224222x05,22422x012,2112112x05,212112x011,2112112x05,212112x010,2422422x06,2242242x09,2444112x07,214442x08,2111122x09,21112x09,2222x012,222",
|
||||
BlainePortrait: "p[0,1,2,3,4]000233x16,2x06,333x16,4x05,2x35,x15,400002x36,11112000024x37,2220004132x35,2431200233223432232320023244222442232000224423244242x05,3224332212x06,2334333112x06,242111142x08,43344412x08,2x35,4x010,2333124x09,42442220000",
|
||||
BrockPortrait: "p[0,1,2,3,4]004x211,4004x213,0x25,4224x211,43233324x27,4x38,4222422x310,224024243111334242022333241142333220433222332223340043133311333134033211112x15,233232x110,23202241142241142200004x18,4x06,32x16,23x08,221122",
|
||||
@@ -1010,6 +1013,7 @@ export const graphicsLibrary = {
|
||||
outline: "p[0,2]11000101001001010001100101010011000",
|
||||
},
|
||||
CharArrowBottom: "p[0,2]x114,0x15,000111x05,1000",
|
||||
CharArrowDown: "p[0,2]x114,0x15,000111x05,1000",
|
||||
CharArrowLeft: "p[0,2]00011001110x19,011110011100011",
|
||||
HalfArrowLeft: "p[0,2]x06,110000111100x114,",
|
||||
HalfArrowRight: "p[0,2]11x06,11110000x16,00x18,",
|
||||
|
||||
@@ -30,6 +30,7 @@ export const createMenuGrapher = (fsp: FullScreenPokemon): MenuGraphr =>
|
||||
"'": "Apostrophe",
|
||||
"�": "eFancy",
|
||||
},
|
||||
dialogScrollDistance: 8,
|
||||
eightBitter: fsp,
|
||||
replacements: {
|
||||
"PLAYER": (): string[] =>
|
||||
@@ -147,7 +148,7 @@ export const createMenuGrapher = (fsp: FullScreenPokemon): MenuGraphr =>
|
||||
},
|
||||
ignoreB: true,
|
||||
textPaddingRight: 12,
|
||||
},
|
||||
} as IMenuSchema,
|
||||
"Option": {
|
||||
childrenSchemas: [
|
||||
{
|
||||
@@ -202,7 +203,7 @@ export const createMenuGrapher = (fsp: FullScreenPokemon): MenuGraphr =>
|
||||
},
|
||||
},
|
||||
textColumnWidth: 144,
|
||||
},
|
||||
} as IMenuSchema,
|
||||
"OptionBattleStyle": {
|
||||
...optionSubMenuBase,
|
||||
childrenSchemas: [
|
||||
@@ -241,7 +242,7 @@ export const createMenuGrapher = (fsp: FullScreenPokemon): MenuGraphr =>
|
||||
preserveArrow: optionPreserveArrow,
|
||||
textXOffset: 32,
|
||||
textYOffset: 0,
|
||||
},
|
||||
} as IMenuSchema,
|
||||
"OptionTextSpeed": {
|
||||
...optionSubMenuBase,
|
||||
childrenSchemas: [
|
||||
@@ -2158,7 +2159,7 @@ export const createMenuGrapher = (fsp: FullScreenPokemon): MenuGraphr =>
|
||||
top: 36,
|
||||
},
|
||||
},
|
||||
}],
|
||||
}],
|
||||
container: "Battle",
|
||||
hidden: true,
|
||||
} as IMenuSchema,
|
||||
|
||||
@@ -22,7 +22,7 @@ export const createScenePlayer = (fsp: FullScreenPokemon): ScenePlayr =>
|
||||
routines: fsp.cutscenes.elderTraining,
|
||||
},
|
||||
Intro: {
|
||||
firstRoutine: "FadeIn",
|
||||
firstRoutine: "start",
|
||||
routines: fsp.cutscenes.intro,
|
||||
},
|
||||
OakIntro: {
|
||||
|
||||
Reference in New Issue
Block a user