import 'package:askiineverdie/src/core/model/race_traits.dart'; /// 종족 데이터 정의 (race data) /// /// 프로그래밍 테마의 7가지 종족 정의 class RaceData { RaceData._(); /// Byte Human: 균형형, 경험치 보너스 static const byteHuman = RaceTraits( raceId: 'byte_human', name: 'Byte Human', statModifiers: { StatType.cha: 2, }, passives: [ PassiveAbility( type: PassiveType.expBonus, value: 0.10, description: '경험치 +10%', ), ], expMultiplier: 1.10, ); /// Null Elf: 민첩/지능형, 마법 데미지 보너스 static const nullElf = RaceTraits( raceId: 'null_elf', name: 'Null Elf', statModifiers: { StatType.str: -1, StatType.con: -1, StatType.dex: 2, StatType.intelligence: 2, }, passives: [ PassiveAbility( type: PassiveType.magicDamageBonus, value: 0.15, description: '마법 데미지 +15%', ), ], ); /// Buffer Dwarf: 힘/체력형, 방어력 보너스 static const bufferDwarf = RaceTraits( raceId: 'buffer_dwarf', name: 'Buffer Dwarf', statModifiers: { StatType.str: 2, StatType.con: 2, StatType.dex: -1, StatType.intelligence: -1, }, passives: [ PassiveAbility( type: PassiveType.defenseBonus, value: 0.10, description: '방어력 +10%', ), ], ); /// Stack Goblin: 민첩형, 크리티컬 보너스 static const stackGoblin = RaceTraits( raceId: 'stack_goblin', name: 'Stack Goblin', statModifiers: { StatType.str: -1, StatType.con: -1, StatType.dex: 3, StatType.cha: 1, }, passives: [ PassiveAbility( type: PassiveType.criticalBonus, value: 0.05, description: '크리티컬 확률 +5%', ), ], ); /// Heap Troll: 체력형, HP 보너스 static const heapTroll = RaceTraits( raceId: 'heap_troll', name: 'Heap Troll', statModifiers: { StatType.str: 3, StatType.con: 3, StatType.dex: -2, StatType.intelligence: -2, }, passives: [ PassiveAbility( type: PassiveType.hpBonus, value: 0.20, description: 'HP +20%', ), ], ); /// Pointer Fairy: 마법형, MP 보너스 static const pointerFairy = RaceTraits( raceId: 'pointer_fairy', name: 'Pointer Fairy', statModifiers: { StatType.str: -2, StatType.con: -2, StatType.dex: 2, StatType.intelligence: 2, StatType.wis: 2, }, passives: [ PassiveAbility( type: PassiveType.mpBonus, value: 0.20, description: 'MP +20%', ), ], ); /// Coredump Undead: 탱커형, 사망 시 장비 보존 static const coredumpUndead = RaceTraits( raceId: 'coredump_undead', name: 'Coredump Undead', statModifiers: { StatType.str: 1, StatType.con: 2, StatType.dex: -1, StatType.cha: -2, }, passives: [ PassiveAbility( type: PassiveType.deathEquipmentPreserve, value: 1.0, description: '사망 시 장비 1개 유지', ), ], ); /// 모든 종족 목록 static const List all = [ byteHuman, nullElf, bufferDwarf, stackGoblin, heapTroll, pointerFairy, coredumpUndead, ]; /// 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; } }