feat(core): 장비 시스템 및 게임 상태 모델 확장
- Equipment 클래스를 11개 슬롯으로 확장 (원본 Main.dfm 충실) - TaskInfo에 몬스터 정보(baseName, part) 추가 - Stats에 현재 HP/MP 필드 추가 - 히스토리 기능 구현 (plotHistory, questHistory) - pq_logic winEquip/winStatIndex 원본 로직 개선 - 퀘스트 몬스터 처리 로직 구현 - SaveData 직렬화 확장
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import 'package:askiineverdie/src/core/model/equipment_slot.dart';
|
||||
import 'package:askiineverdie/src/core/model/game_state.dart';
|
||||
import 'package:askiineverdie/src/core/model/pq_config.dart';
|
||||
import 'package:askiineverdie/src/core/util/deterministic_random.dart';
|
||||
@@ -65,7 +64,7 @@ void main() {
|
||||
config,
|
||||
DeterministicRandom(12),
|
||||
5,
|
||||
EquipmentSlot.weapon,
|
||||
0, // weapon slot
|
||||
),
|
||||
'Baselard',
|
||||
);
|
||||
@@ -74,7 +73,7 @@ void main() {
|
||||
config,
|
||||
DeterministicRandom(15),
|
||||
2,
|
||||
EquipmentSlot.armor,
|
||||
2, // helm slot (armor category)
|
||||
),
|
||||
'-2 Canvas',
|
||||
);
|
||||
@@ -86,18 +85,35 @@ void main() {
|
||||
});
|
||||
|
||||
test('monsterTask picks level-appropriate monsters with modifiers', () {
|
||||
expect(
|
||||
pq_logic.monsterTask(config, DeterministicRandom(99), 5, null, null),
|
||||
'an underage Rakshasa',
|
||||
final result1 = pq_logic.monsterTask(
|
||||
config,
|
||||
DeterministicRandom(99),
|
||||
5,
|
||||
null,
|
||||
null,
|
||||
);
|
||||
expect(
|
||||
pq_logic.monsterTask(config, DeterministicRandom(7), 10, null, null),
|
||||
'a greater Sphinx',
|
||||
expect(result1.displayName, 'an underage Rakshasa');
|
||||
expect(result1.baseName, 'Rakshasa');
|
||||
expect(result1.part, isNotEmpty);
|
||||
|
||||
final result2 = pq_logic.monsterTask(
|
||||
config,
|
||||
DeterministicRandom(7),
|
||||
10,
|
||||
null,
|
||||
null,
|
||||
);
|
||||
expect(
|
||||
pq_logic.monsterTask(config, DeterministicRandom(5), 6, 'Goblin|3', 3),
|
||||
'a Barbed Devil',
|
||||
expect(result2.displayName, 'a greater Sphinx');
|
||||
expect(result2.baseName, 'Sphinx');
|
||||
|
||||
final result3 = pq_logic.monsterTask(
|
||||
config,
|
||||
DeterministicRandom(5),
|
||||
6,
|
||||
'Goblin|3|ear',
|
||||
3,
|
||||
);
|
||||
expect(result3.displayName, 'a Barbed Devil');
|
||||
});
|
||||
|
||||
test('completeQuest and completeAct return deterministic results', () {
|
||||
|
||||
Reference in New Issue
Block a user