Slash-The-Hordes/assets/Scripts/Game/Data/GameSettings.ts

139 lines
4.2 KiB
TypeScript
Raw Permalink Normal View History

2022-12-21 10:30:21 +00:00
import { EnemyProjectileLauncher } from "../Unit/Enemy/ProjectileLauncher.cs/EnemyProjectileLauncher";
2022-11-24 12:17:05 +00:00
export class GameSettings {
2022-11-28 10:49:16 +00:00
public player: PlayerSettings = new PlayerSettings();
public upgrades: UpgradeSettings = new UpgradeSettings();
2022-12-16 12:52:54 +00:00
public metaUpgrades: MetaUpgradesSettings = new MetaUpgradesSettings();
2022-12-06 09:00:18 +00:00
public enemyManager: EnemyManagerSettings = new EnemyManagerSettings();
2022-12-20 12:37:56 +00:00
public items: ItemSettings = new ItemSettings();
2022-11-24 12:17:05 +00:00
}
export class PlayerSettings {
public defaultHP = 0;
public requiredXP: number[] = [];
2022-12-13 14:56:13 +00:00
public speed = 0;
2022-11-28 13:34:34 +00:00
public regenerationDelay = 0;
2022-11-24 12:17:05 +00:00
public collisionDelay = 0;
2022-12-23 10:36:12 +00:00
public magnetDuration = 0;
2022-11-29 14:55:47 +00:00
public weapon: WeaponSettings = new WeaponSettings();
public haloLauncher: HaloLauncherSettings = new HaloLauncherSettings();
2022-12-01 11:16:52 +00:00
public horizontalLauncher: WaveLauncherSettings = new WaveLauncherSettings();
public diagonalLauncher: WaveLauncherSettings = new WaveLauncherSettings();
2022-11-24 12:17:05 +00:00
}
export class WeaponSettings {
public strikeDelay = 0;
2022-11-28 10:49:16 +00:00
public damage = 0;
}
2022-11-30 10:44:20 +00:00
export class WaveLauncherSettings {
public wavesToShootPerUpgrade = 0;
public launcher = new ProjectileLauncherSettings();
}
2022-11-29 14:55:47 +00:00
export class HaloLauncherSettings {
2022-11-30 08:37:09 +00:00
public projectilesToSpawn = 0;
2022-11-30 10:44:20 +00:00
public cooldownDivisorPerUpgrade = 0;
2022-11-30 08:37:09 +00:00
public launcher = new ProjectileLauncherSettings();
}
2022-12-21 10:30:21 +00:00
export class EnemyLauncherSettings {
public enemyIds: string[] = [];
public projectileLifetime = 0;
public projectileSpeed = 0;
public projectileDamage = 0;
public cooldown = 0;
}
2022-11-30 08:37:09 +00:00
export class ProjectileLauncherSettings {
2022-11-29 14:55:47 +00:00
public projectileLifetime = 0;
public projectileSpeed = 0;
2022-11-30 08:37:09 +00:00
public wavesToShoot = 0;
public wavesDelayMs = 0;
2022-11-29 14:55:47 +00:00
public cooldown = 0;
}
2022-11-28 10:49:16 +00:00
export class UpgradeSettings {
public maxWeaponLengthUpgrades = 0;
public maxWeaponDamageUpgrades = 0;
public maxHorizontalProjectileUpgrades = 0;
2022-12-01 11:16:52 +00:00
public maxDiagonalProjectileUpgrades = 0;
2022-11-29 14:55:47 +00:00
public maxHaloProjectileUpgrades = 0;
2022-11-28 10:49:16 +00:00
public maxRegenerationUpgrades = 0;
2022-11-24 12:17:05 +00:00
}
2022-12-06 09:00:18 +00:00
2022-12-16 12:52:54 +00:00
export class MetaUpgradesSettings {
public health = new MetaUpgradeSettings();
public overallDamage = new MetaUpgradeSettings();
public projectilePiercing = new MetaUpgradeSettings();
public movementSpeed = new MetaUpgradeSettings();
public xpGatherer = new MetaUpgradeSettings();
public goldGatherer = new MetaUpgradeSettings();
}
2022-12-13 10:58:40 +00:00
export class MetaUpgradeSettings {
2022-12-16 12:52:54 +00:00
public costs: number[] = [];
public bonuses: number[] = [];
2022-12-13 10:58:40 +00:00
}
2022-12-06 09:00:18 +00:00
export class EnemyManagerSettings {
2022-12-26 17:49:48 +00:00
public axeLauncher = new EnemyLauncherSettings();
public magicOrbLauncher = new EnemyLauncherSettings();
2022-12-12 11:46:17 +00:00
public enemies: EnemySettings[] = [new EnemySettings()];
2022-12-20 12:02:57 +00:00
public periodicFollowMovers: PeriodicFollowMoverSettings[] = [new PeriodicFollowMoverSettings()];
2022-12-12 13:26:53 +00:00
public individualEnemySpawners: IndividualEnemySpawnerSettings[] = [new IndividualEnemySpawnerSettings()];
public circularEnemySpawners: CircularEnemySpawnerSettings[] = [new CircularEnemySpawnerSettings()];
2022-12-12 11:46:17 +00:00
public waveEnemySpawners: WaveEnemySpawnerSettings[] = [new WaveEnemySpawnerSettings()];
2022-12-06 09:00:18 +00:00
}
2022-12-20 12:02:57 +00:00
export class PeriodicFollowMoverSettings {
public enemyIdToAffect = "";
public followTime = 0;
public waitTime = 0;
}
2022-12-12 13:26:53 +00:00
export class GeneralEnemySpawnerSettings {
public enemyId = "";
2022-12-12 12:12:07 +00:00
public startDelay = 0;
public stopDelay = 0;
2022-12-06 09:00:18 +00:00
public cooldown = 0;
2022-12-12 13:26:53 +00:00
}
2022-12-19 11:00:55 +00:00
export class WaveEnemySpawnerSettings implements ISpawner {
2022-12-12 13:26:53 +00:00
public common = new GeneralEnemySpawnerSettings();
public enemiesToSpawn = 0;
}
2022-12-19 11:00:55 +00:00
export class CircularEnemySpawnerSettings implements ISpawner {
2022-12-12 13:26:53 +00:00
public common = new GeneralEnemySpawnerSettings();
public enemiesToSpawn = 0;
}
2022-12-19 11:00:55 +00:00
export class IndividualEnemySpawnerSettings implements ISpawner {
2022-12-12 13:26:53 +00:00
public common = new GeneralEnemySpawnerSettings();
2022-12-12 11:46:17 +00:00
}
2022-12-19 11:00:55 +00:00
export interface ISpawner {
common: GeneralEnemySpawnerSettings;
}
2022-12-12 11:46:17 +00:00
export class EnemySettings {
public id = "";
public moveType = "";
2022-12-19 12:48:03 +00:00
public graphicsType = "";
2022-12-12 11:46:17 +00:00
public health = 0;
public damage = 0;
public speed = 0;
2022-12-13 17:56:00 +00:00
public lifetime = 0;
2022-12-20 12:37:56 +00:00
2022-12-13 17:56:00 +00:00
public xpReward = 0;
public goldReward = 0;
2022-12-20 12:37:56 +00:00
public healthPotionRewardChance = 0;
2022-12-23 08:52:26 +00:00
public magnetRewardChance = 0;
public chestRewardChance = 0;
2022-12-20 12:37:56 +00:00
}
export class ItemSettings {
public healthPerPotion = 0;
2022-12-06 09:00:18 +00:00
}