- 21개 종족 균형 재설계 (스탯 합계 = 0) - 18개 클래스 균형 재설계 (스탯 합계 = +3) - Traits에 raceId, classId 필드 추가 - 저장/불러오기에 종족/클래스 ID 추가 - 캐릭터 생성 UI에서 RaceData/ClassData 사용 - 선택 시 스탯 보정 및 패시브 정보 표시
517 lines
12 KiB
Dart
517 lines
12 KiB
Dart
import 'package:askiineverdie/src/core/model/race_traits.dart';
|
|
|
|
/// 종족 데이터 정의 (race data)
|
|
///
|
|
/// 21가지 종족 - 모든 종족의 스탯 합계 = 0 (균형)
|
|
/// 패시브는 각 종족의 고유한 플레이스타일을 정의
|
|
class RaceData {
|
|
RaceData._();
|
|
|
|
// ==========================================================================
|
|
// HP/균형형 종족
|
|
// ==========================================================================
|
|
|
|
/// Byte Human: 균형형 (스탯 합계: 0)
|
|
/// 특화 없이 경험치로 보상
|
|
static const byteHuman = RaceTraits(
|
|
raceId: 'byte_human',
|
|
name: 'Byte Human',
|
|
statModifiers: {},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.expBonus,
|
|
value: 0.05,
|
|
description: '경험치 +5%',
|
|
),
|
|
],
|
|
expMultiplier: 1.05,
|
|
);
|
|
|
|
/// Kernel Giant: 탱커형 (스탯 합계: 0)
|
|
/// STR/CON +2, DEX/INT -2
|
|
static const kernelGiant = RaceTraits(
|
|
raceId: 'kernel_giant',
|
|
name: 'Kernel Giant',
|
|
statModifiers: {
|
|
StatType.str: 2,
|
|
StatType.con: 2,
|
|
StatType.dex: -2,
|
|
StatType.intelligence: -2,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.hpBonus,
|
|
value: 0.10,
|
|
description: 'HP +10%',
|
|
),
|
|
],
|
|
);
|
|
|
|
// ==========================================================================
|
|
// 지혜/마법 종족 (WIS 기반)
|
|
// ==========================================================================
|
|
|
|
/// Null Elf: 마법형 (스탯 합계: 0)
|
|
/// WIS/INT +2, STR/CON -2
|
|
static const nullElf = RaceTraits(
|
|
raceId: 'null_elf',
|
|
name: 'Null Elf',
|
|
statModifiers: {
|
|
StatType.wis: 2,
|
|
StatType.intelligence: 1,
|
|
StatType.str: -2,
|
|
StatType.con: -1,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.magicDamageBonus,
|
|
value: 0.08,
|
|
description: '마법 데미지 +8%',
|
|
),
|
|
],
|
|
);
|
|
|
|
/// Recursive Sage: 순수 마법형 (스탯 합계: 0)
|
|
/// WIS/INT +2, STR -2, DEX -1, CHA +1
|
|
static const recursiveSage = RaceTraits(
|
|
raceId: 'recursive_sage',
|
|
name: 'Recursive Sage',
|
|
statModifiers: {
|
|
StatType.wis: 2,
|
|
StatType.intelligence: 2,
|
|
StatType.str: -2,
|
|
StatType.dex: -1,
|
|
StatType.con: -1,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.mpBonus,
|
|
value: 0.10,
|
|
description: 'MP +10%',
|
|
),
|
|
],
|
|
);
|
|
|
|
/// Callback Priest: 지원형 (스탯 합계: 0)
|
|
/// WIS +2, CHA +1, STR -1, DEX -1, CON -1
|
|
static const callbackPriest = RaceTraits(
|
|
raceId: 'callback_priest',
|
|
name: 'Callback Priest',
|
|
statModifiers: {
|
|
StatType.wis: 2,
|
|
StatType.cha: 1,
|
|
StatType.str: -1,
|
|
StatType.dex: -1,
|
|
StatType.con: -1,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.expBonus,
|
|
value: 0.03,
|
|
description: '경험치 +3%',
|
|
),
|
|
],
|
|
expMultiplier: 1.03,
|
|
);
|
|
|
|
// ==========================================================================
|
|
// 체력/방어 종족 (CON 기반)
|
|
// ==========================================================================
|
|
|
|
/// Buffer Dwarf: 방어형 (스탯 합계: 0)
|
|
/// CON +2, STR +1, DEX -2, CHA -1
|
|
static const bufferDwarf = RaceTraits(
|
|
raceId: 'buffer_dwarf',
|
|
name: 'Buffer Dwarf',
|
|
statModifiers: {
|
|
StatType.con: 2,
|
|
StatType.str: 1,
|
|
StatType.dex: -2,
|
|
StatType.cha: -1,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.defenseBonus,
|
|
value: 0.08,
|
|
description: '방어력 +8%',
|
|
),
|
|
],
|
|
);
|
|
|
|
/// Coredump Undead: 생존형 (스탯 합계: 0)
|
|
/// CON +2, STR +1, CHA -2, DEX -1
|
|
static const coredumpUndead = RaceTraits(
|
|
raceId: 'coredump_undead',
|
|
name: 'Coredump Undead',
|
|
statModifiers: {
|
|
StatType.con: 2,
|
|
StatType.str: 1,
|
|
StatType.cha: -2,
|
|
StatType.dex: -1,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.deathEquipmentPreserve,
|
|
value: 1.0,
|
|
description: '사망 시 장비 1개 유지',
|
|
),
|
|
],
|
|
);
|
|
|
|
// ==========================================================================
|
|
// 민첩/크리티컬 종족 (DEX 기반)
|
|
// ==========================================================================
|
|
|
|
/// Bit Halfling: 민첩형 (스탯 합계: 0)
|
|
/// DEX +2, CHA +1, STR -2, CON -1
|
|
static const bitHalfling = RaceTraits(
|
|
raceId: 'bit_halfling',
|
|
name: 'Bit Halfling',
|
|
statModifiers: {
|
|
StatType.dex: 2,
|
|
StatType.cha: 1,
|
|
StatType.str: -2,
|
|
StatType.con: -1,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.criticalBonus,
|
|
value: 0.03,
|
|
description: '크리티컬 +3%',
|
|
),
|
|
],
|
|
);
|
|
|
|
/// Cache Imp: 속도형 (스탯 합계: 0)
|
|
/// DEX +2, INT +1, CON -2, WIS -1
|
|
static const cacheImp = RaceTraits(
|
|
raceId: 'cache_imp',
|
|
name: 'Cache Imp',
|
|
statModifiers: {
|
|
StatType.dex: 2,
|
|
StatType.intelligence: 1,
|
|
StatType.con: -2,
|
|
StatType.wis: -1,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.criticalBonus,
|
|
value: 0.02,
|
|
description: '크리티컬 +2%',
|
|
),
|
|
],
|
|
);
|
|
|
|
/// Iterator Rogue: 암살형 (스탯 합계: 0)
|
|
/// DEX +3, STR +1, CON -2, WIS -1, CHA -1
|
|
static const iteratorRogue = RaceTraits(
|
|
raceId: 'iterator_rogue',
|
|
name: 'Iterator Rogue',
|
|
statModifiers: {
|
|
StatType.dex: 3,
|
|
StatType.str: 1,
|
|
StatType.con: -2,
|
|
StatType.wis: -1,
|
|
StatType.cha: -1,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.criticalBonus,
|
|
value: 0.04,
|
|
description: '크리티컬 +4%',
|
|
),
|
|
],
|
|
);
|
|
|
|
// ==========================================================================
|
|
// 힘/물리 종족 (STR 기반)
|
|
// ==========================================================================
|
|
|
|
/// Array Orc: 공격형 (스탯 합계: 0)
|
|
/// STR +2, CON +1, INT -2, WIS -1
|
|
static const arrayOrc = RaceTraits(
|
|
raceId: 'array_orc',
|
|
name: 'Array Orc',
|
|
statModifiers: {
|
|
StatType.str: 2,
|
|
StatType.con: 1,
|
|
StatType.intelligence: -2,
|
|
StatType.wis: -1,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.hpBonus,
|
|
value: 0.05,
|
|
description: 'HP +5%',
|
|
),
|
|
],
|
|
);
|
|
|
|
/// Flag Knight: 전사형 (스탯 합계: 0)
|
|
/// STR +2, CHA +1, INT -2, WIS -1
|
|
static const flagKnight = RaceTraits(
|
|
raceId: 'flag_knight',
|
|
name: 'Flag Knight',
|
|
statModifiers: {
|
|
StatType.str: 2,
|
|
StatType.cha: 1,
|
|
StatType.intelligence: -2,
|
|
StatType.wis: -1,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.defenseBonus,
|
|
value: 0.05,
|
|
description: '방어력 +5%',
|
|
),
|
|
],
|
|
);
|
|
|
|
/// Protocol Paladin: 수호자형 (스탯 합계: 0)
|
|
/// STR +2, CON +1, CHA +1, DEX -2, INT -2
|
|
static const protocolPaladin = RaceTraits(
|
|
raceId: 'protocol_paladin',
|
|
name: 'Protocol Paladin',
|
|
statModifiers: {
|
|
StatType.str: 2,
|
|
StatType.con: 1,
|
|
StatType.cha: 1,
|
|
StatType.dex: -2,
|
|
StatType.intelligence: -2,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.defenseBonus,
|
|
value: 0.06,
|
|
description: '방어력 +6%',
|
|
),
|
|
],
|
|
);
|
|
|
|
// ==========================================================================
|
|
// 복합 스탯 종족
|
|
// ==========================================================================
|
|
|
|
/// Stack Goblin: 기동형 (스탯 합계: 0)
|
|
/// DEX +2, CON +1, STR -1, CHA -2
|
|
static const stackGoblin = RaceTraits(
|
|
raceId: 'stack_goblin',
|
|
name: 'Stack Goblin',
|
|
statModifiers: {
|
|
StatType.dex: 2,
|
|
StatType.con: 1,
|
|
StatType.str: -1,
|
|
StatType.cha: -2,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.criticalBonus,
|
|
value: 0.02,
|
|
description: '크리티컬 +2%',
|
|
),
|
|
],
|
|
);
|
|
|
|
/// Heap Troll: 중장갑형 (스탯 합계: 0)
|
|
/// CON +2, STR +2, INT -2, DEX -2
|
|
static const heapTroll = RaceTraits(
|
|
raceId: 'heap_troll',
|
|
name: 'Heap Troll',
|
|
statModifiers: {
|
|
StatType.con: 2,
|
|
StatType.str: 2,
|
|
StatType.intelligence: -2,
|
|
StatType.dex: -2,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.hpBonus,
|
|
value: 0.12,
|
|
description: 'HP +12%',
|
|
),
|
|
],
|
|
);
|
|
|
|
/// Index Ranger: 정찰형 (스탯 합계: 0)
|
|
/// DEX +2, CON +1, INT -1, CHA -2
|
|
static const indexRanger = RaceTraits(
|
|
raceId: 'index_ranger',
|
|
name: 'Index Ranger',
|
|
statModifiers: {
|
|
StatType.dex: 2,
|
|
StatType.con: 1,
|
|
StatType.intelligence: -1,
|
|
StatType.cha: -2,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.criticalBonus,
|
|
value: 0.03,
|
|
description: '크리티컬 +3%',
|
|
),
|
|
],
|
|
);
|
|
|
|
// ==========================================================================
|
|
// MP/주문 종족 (INT/MP 기반)
|
|
// ==========================================================================
|
|
|
|
/// Pointer Fairy: MP 특화형 (스탯 합계: 0)
|
|
/// WIS +2, INT +1, STR -2, CON -1
|
|
static const pointerFairy = RaceTraits(
|
|
raceId: 'pointer_fairy',
|
|
name: 'Pointer Fairy',
|
|
statModifiers: {
|
|
StatType.wis: 2,
|
|
StatType.intelligence: 1,
|
|
StatType.str: -2,
|
|
StatType.con: -1,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.mpBonus,
|
|
value: 0.12,
|
|
description: 'MP +12%',
|
|
),
|
|
],
|
|
);
|
|
|
|
/// Register Gnome: 지능형 (스탯 합계: 0)
|
|
/// INT +2, DEX +1, STR -2, CON -1
|
|
static const registerGnome = RaceTraits(
|
|
raceId: 'register_gnome',
|
|
name: 'Register Gnome',
|
|
statModifiers: {
|
|
StatType.intelligence: 2,
|
|
StatType.dex: 1,
|
|
StatType.str: -2,
|
|
StatType.con: -1,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.magicDamageBonus,
|
|
value: 0.05,
|
|
description: '마법 데미지 +5%',
|
|
),
|
|
],
|
|
);
|
|
|
|
/// Thread Spirit: 영체형 (스탯 합계: 0)
|
|
/// INT +1, WIS +1, CON -2
|
|
static const threadSpirit = RaceTraits(
|
|
raceId: 'thread_spirit',
|
|
name: 'Thread Spirit',
|
|
statModifiers: {
|
|
StatType.intelligence: 1,
|
|
StatType.wis: 1,
|
|
StatType.con: -2,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.mpBonus,
|
|
value: 0.15,
|
|
description: 'MP +15%',
|
|
),
|
|
],
|
|
);
|
|
|
|
/// Loop Wizard: 순환 마법형 (스탯 합계: 0)
|
|
/// INT +2, WIS +1, STR -1, CON -1, DEX -1
|
|
static const loopWizard = RaceTraits(
|
|
raceId: 'loop_wizard',
|
|
name: 'Loop Wizard',
|
|
statModifiers: {
|
|
StatType.intelligence: 2,
|
|
StatType.wis: 1,
|
|
StatType.str: -1,
|
|
StatType.con: -1,
|
|
StatType.dex: -1,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.mpBonus,
|
|
value: 0.08,
|
|
description: 'MP +8%',
|
|
),
|
|
PassiveAbility(
|
|
type: PassiveType.magicDamageBonus,
|
|
value: 0.04,
|
|
description: '마법 데미지 +4%',
|
|
),
|
|
],
|
|
);
|
|
|
|
/// Lambda Druid: 자연 마법형 (스탯 합계: 0)
|
|
/// INT +2, WIS +2, STR -2, CON -2
|
|
static const lambdaDruid = RaceTraits(
|
|
raceId: 'lambda_druid',
|
|
name: 'Lambda Druid',
|
|
statModifiers: {
|
|
StatType.intelligence: 2,
|
|
StatType.wis: 2,
|
|
StatType.str: -2,
|
|
StatType.con: -2,
|
|
},
|
|
passives: [
|
|
PassiveAbility(
|
|
type: PassiveType.magicDamageBonus,
|
|
value: 0.06,
|
|
description: '마법 데미지 +6%',
|
|
),
|
|
PassiveAbility(
|
|
type: PassiveType.mpBonus,
|
|
value: 0.06,
|
|
description: 'MP +6%',
|
|
),
|
|
],
|
|
);
|
|
|
|
/// 모든 종족 목록 (21개)
|
|
static const List<RaceTraits> all = [
|
|
// 균형형
|
|
byteHuman,
|
|
kernelGiant,
|
|
// 지혜형
|
|
nullElf,
|
|
recursiveSage,
|
|
callbackPriest,
|
|
// 체력형
|
|
bufferDwarf,
|
|
coredumpUndead,
|
|
// 민첩형
|
|
bitHalfling,
|
|
cacheImp,
|
|
iteratorRogue,
|
|
// 힘형
|
|
arrayOrc,
|
|
flagKnight,
|
|
protocolPaladin,
|
|
// 복합형
|
|
stackGoblin,
|
|
heapTroll,
|
|
indexRanger,
|
|
// 마법형
|
|
pointerFairy,
|
|
registerGnome,
|
|
threadSpirit,
|
|
loopWizard,
|
|
lambdaDruid,
|
|
];
|
|
|
|
/// ID로 종족 찾기
|
|
static RaceTraits? findById(String raceId) {
|
|
for (final race in all) {
|
|
if (race.raceId == raceId) return race;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/// 이름으로 종족 찾기
|
|
static RaceTraits? findByName(String name) {
|
|
for (final race in all) {
|
|
if (race.name == name) return race;
|
|
}
|
|
return null;
|
|
}
|
|
}
|