discipline: elemental revamp - rename, lock, merge tabs, add missing, dedupe
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s
This commit is contained in:
@@ -5,229 +5,148 @@
|
||||
import { DisciplinesAttunementType } from '../../types/disciplines';
|
||||
import type { DisciplineDefinition } from '../../types/disciplines';
|
||||
|
||||
// ── Composite Elements ─────────────────────────────────────────────────────
|
||||
interface AdvancedConversionConfig {
|
||||
id: string;
|
||||
name: string;
|
||||
manaType: DisciplineDefinition['manaType'];
|
||||
cost: number;
|
||||
description: string;
|
||||
conversionRate: number;
|
||||
difficultyFactor: number;
|
||||
scalingFactor: number;
|
||||
drainBase: number;
|
||||
sourceManaTypes: DisciplineDefinition['manaType'][];
|
||||
customOnceDescription?: string;
|
||||
customOnceAmount?: number;
|
||||
customInfiniteDescription?: string;
|
||||
customInfiniteAmount?: number;
|
||||
infiniteThreshold?: number;
|
||||
}
|
||||
|
||||
const COMP_CONVERSION = 0.35;
|
||||
const COMP_DRAIN = 2;
|
||||
const COMP_DIFF = 160;
|
||||
const COMP_SCALE = 80;
|
||||
function createAdvancedConversionDiscipline(cfg: AdvancedConversionConfig): DisciplineDefinition {
|
||||
const nameLower = cfg.name.toLowerCase();
|
||||
const onceDesc = cfg.customOnceDescription ?? `+${cfg.conversionRate} ${cfg.name} Conversion/sec`;
|
||||
const onceAmt = cfg.customOnceAmount ?? cfg.conversionRate;
|
||||
const infDesc = cfg.customInfiniteDescription ?? `Every 100 XP: +${cfg.conversionRate * 0.5} ${cfg.name} Conversion/sec`;
|
||||
const infAmt = cfg.customInfiniteAmount ?? cfg.conversionRate * 0.5;
|
||||
const infThreshold = cfg.infiniteThreshold ?? 400;
|
||||
|
||||
const metalDiscipline: DisciplineDefinition = {
|
||||
id: 'regen-metal',
|
||||
name: 'Metal Mana Flow',
|
||||
attunement: DisciplinesAttunementType.BASE,
|
||||
manaType: 'metal',
|
||||
baseCost: 12,
|
||||
description: 'Convert raw mana + fire mana + earth mana into metal mana over time.',
|
||||
statBonus: { stat: 'conversion_metal', baseValue: COMP_CONVERSION, label: 'Metal Conversion/tick' },
|
||||
difficultyFactor: COMP_DIFF,
|
||||
scalingFactor: COMP_SCALE,
|
||||
drainBase: COMP_DRAIN,
|
||||
conversionRate: COMP_CONVERSION,
|
||||
sourceManaTypes: ['raw', 'fire', 'earth'],
|
||||
requires: ['metal'],
|
||||
perks: [
|
||||
{
|
||||
id: 'regen-metal-1',
|
||||
type: 'once',
|
||||
threshold: 150,
|
||||
value: 0,
|
||||
description: '+0.35 Metal Conversion/tick',
|
||||
bonus: { stat: 'conversion_metal', amount: COMP_CONVERSION },
|
||||
return {
|
||||
id: cfg.id,
|
||||
name: `${cfg.name} Mana Conversion Speed`,
|
||||
attunement: DisciplinesAttunementType.BASE,
|
||||
manaType: cfg.manaType,
|
||||
baseCost: cfg.cost,
|
||||
description: cfg.description,
|
||||
statBonus: {
|
||||
stat: `conversion_${cfg.manaType}` as DisciplineDefinition['statBonus']['stat'],
|
||||
baseValue: cfg.conversionRate,
|
||||
label: `${cfg.name} Conversion/sec`,
|
||||
},
|
||||
{
|
||||
id: 'regen-metal-inf',
|
||||
type: 'infinite',
|
||||
threshold: 400,
|
||||
value: 100,
|
||||
description: 'Every 100 XP: +0.15 Metal Conversion/tick',
|
||||
bonus: { stat: 'conversion_metal', amount: 0.15 },
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const sandDiscipline: DisciplineDefinition = {
|
||||
id: 'regen-sand',
|
||||
name: 'Sand Mana Flow',
|
||||
attunement: DisciplinesAttunementType.BASE,
|
||||
manaType: 'sand',
|
||||
baseCost: 12,
|
||||
description: 'Convert raw mana + earth mana + water mana into sand mana over time.',
|
||||
statBonus: { stat: 'conversion_sand', baseValue: COMP_CONVERSION, label: 'Sand Conversion/tick' },
|
||||
difficultyFactor: COMP_DIFF,
|
||||
scalingFactor: COMP_SCALE,
|
||||
drainBase: COMP_DRAIN,
|
||||
conversionRate: COMP_CONVERSION,
|
||||
sourceManaTypes: ['raw', 'earth', 'water'],
|
||||
requires: ['sand'],
|
||||
perks: [
|
||||
{
|
||||
id: 'regen-sand-1',
|
||||
type: 'once',
|
||||
threshold: 150,
|
||||
value: 0,
|
||||
description: '+0.35 Sand Conversion/tick',
|
||||
bonus: { stat: 'conversion_sand', amount: COMP_CONVERSION },
|
||||
},
|
||||
{
|
||||
id: 'regen-sand-inf',
|
||||
type: 'infinite',
|
||||
threshold: 400,
|
||||
value: 100,
|
||||
description: 'Every 100 XP: +0.15 Sand Conversion/tick',
|
||||
bonus: { stat: 'conversion_sand', amount: 0.15 },
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const lightningDiscipline: DisciplineDefinition = {
|
||||
id: 'regen-lightning',
|
||||
name: 'Lightning Mana Flow',
|
||||
attunement: DisciplinesAttunementType.BASE,
|
||||
manaType: 'lightning',
|
||||
baseCost: 12,
|
||||
description: 'Convert raw mana + fire mana + air mana into lightning mana over time.',
|
||||
statBonus: { stat: 'conversion_lightning', baseValue: COMP_CONVERSION, label: 'Lightning Conversion/tick' },
|
||||
difficultyFactor: COMP_DIFF,
|
||||
scalingFactor: COMP_SCALE,
|
||||
drainBase: COMP_DRAIN,
|
||||
conversionRate: COMP_CONVERSION,
|
||||
sourceManaTypes: ['raw', 'fire', 'air'],
|
||||
requires: ['lightning'],
|
||||
perks: [
|
||||
{
|
||||
id: 'regen-lightning-1',
|
||||
type: 'once',
|
||||
threshold: 150,
|
||||
value: 0,
|
||||
description: '+0.35 Lightning Conversion/tick',
|
||||
bonus: { stat: 'conversion_lightning', amount: COMP_CONVERSION },
|
||||
},
|
||||
{
|
||||
id: 'regen-lightning-inf',
|
||||
type: 'infinite',
|
||||
threshold: 400,
|
||||
value: 100,
|
||||
description: 'Every 100 XP: +0.15 Lightning Conversion/tick',
|
||||
bonus: { stat: 'conversion_lightning', amount: 0.15 },
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
// ── Exotic Elements ────────────────────────────────────────────────────────
|
||||
|
||||
const EXO_CONVERSION = 0.25;
|
||||
const EXO_DRAIN = 3;
|
||||
const EXO_DIFF = 220;
|
||||
const EXO_SCALE = 110;
|
||||
|
||||
const crystalDiscipline: DisciplineDefinition = {
|
||||
id: 'regen-crystal',
|
||||
name: 'Crystal Mana Flow',
|
||||
attunement: DisciplinesAttunementType.BASE,
|
||||
manaType: 'crystal',
|
||||
baseCost: 18,
|
||||
description: 'Convert raw mana + sand mana + light mana into crystal mana over time.',
|
||||
statBonus: { stat: 'conversion_crystal', baseValue: EXO_CONVERSION, label: 'Crystal Conversion/tick' },
|
||||
difficultyFactor: EXO_DIFF,
|
||||
scalingFactor: EXO_SCALE,
|
||||
drainBase: EXO_DRAIN,
|
||||
conversionRate: EXO_CONVERSION,
|
||||
sourceManaTypes: ['raw', 'sand', 'light'],
|
||||
requires: ['crystal'],
|
||||
perks: [
|
||||
{
|
||||
id: 'regen-crystal-1',
|
||||
type: 'once',
|
||||
threshold: 200,
|
||||
value: 0,
|
||||
description: '+0.25 Crystal Conversion/tick',
|
||||
bonus: { stat: 'conversion_crystal', amount: EXO_CONVERSION },
|
||||
},
|
||||
{
|
||||
id: 'regen-crystal-inf',
|
||||
type: 'infinite',
|
||||
threshold: 500,
|
||||
value: 100,
|
||||
description: 'Every 100 XP: +0.1 Crystal Conversion/tick',
|
||||
bonus: { stat: 'conversion_crystal', amount: 0.1 },
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const stellarDiscipline: DisciplineDefinition = {
|
||||
id: 'regen-stellar',
|
||||
name: 'Stellar Mana Flow',
|
||||
attunement: DisciplinesAttunementType.BASE,
|
||||
manaType: 'stellar',
|
||||
baseCost: 18,
|
||||
description: 'Convert raw mana + fire mana + light mana into stellar mana over time.',
|
||||
statBonus: { stat: 'conversion_stellar', baseValue: EXO_CONVERSION, label: 'Stellar Conversion/tick' },
|
||||
difficultyFactor: EXO_DIFF,
|
||||
scalingFactor: EXO_SCALE,
|
||||
drainBase: EXO_DRAIN,
|
||||
conversionRate: EXO_CONVERSION,
|
||||
sourceManaTypes: ['raw', 'fire', 'light'],
|
||||
requires: ['stellar'],
|
||||
perks: [
|
||||
{
|
||||
id: 'regen-stellar-1',
|
||||
type: 'once',
|
||||
threshold: 200,
|
||||
value: 0,
|
||||
description: '+0.25 Stellar Conversion/tick',
|
||||
bonus: { stat: 'conversion_stellar', amount: EXO_CONVERSION },
|
||||
},
|
||||
{
|
||||
id: 'regen-stellar-inf',
|
||||
type: 'infinite',
|
||||
threshold: 500,
|
||||
value: 100,
|
||||
description: 'Every 100 XP: +0.1 Stellar Conversion/tick',
|
||||
bonus: { stat: 'conversion_stellar', amount: 0.1 },
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const voidDiscipline: DisciplineDefinition = {
|
||||
id: 'regen-void',
|
||||
name: 'Void Mana Flow',
|
||||
attunement: DisciplinesAttunementType.BASE,
|
||||
manaType: 'void',
|
||||
baseCost: 18,
|
||||
description: 'Convert raw mana + dark mana + death mana into void mana over time.',
|
||||
statBonus: { stat: 'conversion_void', baseValue: EXO_CONVERSION, label: 'Void Conversion/tick' },
|
||||
difficultyFactor: EXO_DIFF,
|
||||
scalingFactor: EXO_SCALE,
|
||||
drainBase: EXO_DRAIN,
|
||||
conversionRate: EXO_CONVERSION,
|
||||
sourceManaTypes: ['raw', 'dark', 'death'],
|
||||
requires: ['void'],
|
||||
perks: [
|
||||
{
|
||||
id: 'regen-void-1',
|
||||
type: 'once',
|
||||
threshold: 200,
|
||||
value: 0,
|
||||
description: '+0.25 Void Conversion/tick',
|
||||
bonus: { stat: 'conversion_void', amount: EXO_CONVERSION },
|
||||
},
|
||||
{
|
||||
id: 'regen-void-inf',
|
||||
type: 'infinite',
|
||||
threshold: 500,
|
||||
value: 100,
|
||||
description: 'Every 100 XP: +0.1 Void Conversion/tick',
|
||||
bonus: { stat: 'conversion_void', amount: 0.1 },
|
||||
},
|
||||
],
|
||||
};
|
||||
difficultyFactor: cfg.difficultyFactor,
|
||||
scalingFactor: cfg.scalingFactor,
|
||||
drainBase: cfg.drainBase,
|
||||
conversionRate: cfg.conversionRate,
|
||||
sourceManaTypes: cfg.sourceManaTypes,
|
||||
requires: [cfg.manaType],
|
||||
perks: [
|
||||
{
|
||||
id: `${cfg.id}-1`,
|
||||
type: 'once',
|
||||
threshold: 150,
|
||||
value: 0,
|
||||
description: onceDesc,
|
||||
bonus: { stat: `conversion_${cfg.manaType}`, amount: onceAmt },
|
||||
},
|
||||
{
|
||||
id: `${cfg.id}-inf`,
|
||||
type: 'infinite',
|
||||
threshold: infThreshold,
|
||||
value: 100,
|
||||
description: infDesc,
|
||||
bonus: { stat: `conversion_${cfg.manaType}`, amount: infAmt },
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
export const elementalRegenAdvancedDisciplines: DisciplineDefinition[] = [
|
||||
metalDiscipline,
|
||||
sandDiscipline,
|
||||
lightningDiscipline,
|
||||
crystalDiscipline,
|
||||
stellarDiscipline,
|
||||
voidDiscipline,
|
||||
// ── Composite Elements ─────────────────────────────────────────────────────
|
||||
createAdvancedConversionDiscipline({
|
||||
id: 'regen-metal',
|
||||
name: 'Metal',
|
||||
manaType: 'metal',
|
||||
cost: 12,
|
||||
description: 'Convert raw mana + fire mana + earth mana into metal mana over time.',
|
||||
conversionRate: 0.35,
|
||||
difficultyFactor: 160,
|
||||
scalingFactor: 80,
|
||||
drainBase: 2,
|
||||
sourceManaTypes: ['raw', 'fire', 'earth'],
|
||||
}),
|
||||
createAdvancedConversionDiscipline({
|
||||
id: 'regen-sand',
|
||||
name: 'Sand',
|
||||
manaType: 'sand',
|
||||
cost: 12,
|
||||
description: 'Convert raw mana + earth mana + water mana into sand mana over time.',
|
||||
conversionRate: 0.35,
|
||||
difficultyFactor: 160,
|
||||
scalingFactor: 80,
|
||||
drainBase: 2,
|
||||
sourceManaTypes: ['raw', 'earth', 'water'],
|
||||
}),
|
||||
createAdvancedConversionDiscipline({
|
||||
id: 'regen-lightning',
|
||||
name: 'Lightning',
|
||||
manaType: 'lightning',
|
||||
cost: 12,
|
||||
description: 'Convert raw mana + fire mana + air mana into lightning mana over time.',
|
||||
conversionRate: 0.35,
|
||||
difficultyFactor: 160,
|
||||
scalingFactor: 80,
|
||||
drainBase: 2,
|
||||
sourceManaTypes: ['raw', 'fire', 'air'],
|
||||
}),
|
||||
|
||||
// ── Exotic Elements ────────────────────────────────────────────────────────
|
||||
createAdvancedConversionDiscipline({
|
||||
id: 'regen-crystal',
|
||||
name: 'Crystal',
|
||||
manaType: 'crystal',
|
||||
cost: 18,
|
||||
description: 'Convert raw mana + sand mana + light mana into crystal mana over time.',
|
||||
conversionRate: 0.25,
|
||||
difficultyFactor: 220,
|
||||
scalingFactor: 110,
|
||||
drainBase: 3,
|
||||
sourceManaTypes: ['raw', 'sand', 'light'],
|
||||
infiniteThreshold: 500,
|
||||
}),
|
||||
createAdvancedConversionDiscipline({
|
||||
id: 'regen-stellar',
|
||||
name: 'Stellar',
|
||||
manaType: 'stellar',
|
||||
cost: 18,
|
||||
description: 'Convert raw mana + fire mana + light mana into stellar mana over time.',
|
||||
conversionRate: 0.25,
|
||||
difficultyFactor: 220,
|
||||
scalingFactor: 110,
|
||||
drainBase: 3,
|
||||
sourceManaTypes: ['raw', 'fire', 'light'],
|
||||
infiniteThreshold: 500,
|
||||
}),
|
||||
createAdvancedConversionDiscipline({
|
||||
id: 'regen-void',
|
||||
name: 'Void',
|
||||
manaType: 'void',
|
||||
cost: 18,
|
||||
description: 'Convert raw mana + dark mana + death mana into void mana over time.',
|
||||
conversionRate: 0.25,
|
||||
difficultyFactor: 220,
|
||||
scalingFactor: 110,
|
||||
drainBase: 3,
|
||||
sourceManaTypes: ['raw', 'dark', 'death'],
|
||||
infiniteThreshold: 500,
|
||||
}),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user