refactor(engine): 스킬 및 전투 시스템 개선
- SkillData 조정 - CombatCalculator 개선 - ItemService 업데이트 - ProgressService 개선 - SkillService 정리
This commit is contained in:
@@ -19,7 +19,7 @@ class SkillData {
|
|||||||
mpCost: 10,
|
mpCost: 10,
|
||||||
cooldownMs: 3000,
|
cooldownMs: 3000,
|
||||||
power: 15,
|
power: 15,
|
||||||
damageMultiplier: 1.5,
|
damageMultiplier: 2.0,
|
||||||
);
|
);
|
||||||
|
|
||||||
/// Core Dump - 중급 공격
|
/// Core Dump - 중급 공격
|
||||||
@@ -56,7 +56,7 @@ class SkillData {
|
|||||||
mpCost: 80,
|
mpCost: 80,
|
||||||
cooldownMs: 45000,
|
cooldownMs: 45000,
|
||||||
power: 60,
|
power: 60,
|
||||||
damageMultiplier: 6.0,
|
damageMultiplier: 4.0,
|
||||||
selfDamagePercent: 0.1,
|
selfDamagePercent: 0.1,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ class SkillData {
|
|||||||
mpCost: 60,
|
mpCost: 60,
|
||||||
cooldownMs: 30000,
|
cooldownMs: 30000,
|
||||||
power: 50,
|
power: 50,
|
||||||
damageMultiplier: 5.0,
|
damageMultiplier: 3.5,
|
||||||
);
|
);
|
||||||
|
|
||||||
/// Inject Code - 방어 무시 공격
|
/// Inject Code - 방어 무시 공격
|
||||||
@@ -91,7 +91,7 @@ class SkillData {
|
|||||||
mpCost: 30,
|
mpCost: 30,
|
||||||
cooldownMs: 10000,
|
cooldownMs: 10000,
|
||||||
power: 12,
|
power: 12,
|
||||||
damageMultiplier: 1.2,
|
damageMultiplier: 2.0,
|
||||||
hitCount: 3,
|
hitCount: 3,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ class SkillData {
|
|||||||
mpCost: 45,
|
mpCost: 45,
|
||||||
cooldownMs: 15000,
|
cooldownMs: 15000,
|
||||||
power: 10,
|
power: 10,
|
||||||
damageMultiplier: 1.0,
|
damageMultiplier: 2.0,
|
||||||
hitCount: 5,
|
hitCount: 5,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ class SkillData {
|
|||||||
mpCost: 50,
|
mpCost: 50,
|
||||||
cooldownMs: 25000,
|
cooldownMs: 25000,
|
||||||
power: 40,
|
power: 40,
|
||||||
damageMultiplier: 3.5,
|
damageMultiplier: 3.2,
|
||||||
element: SkillElement.chaos,
|
element: SkillElement.chaos,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ class SkillData {
|
|||||||
mpCost: 55,
|
mpCost: 55,
|
||||||
cooldownMs: 20000,
|
cooldownMs: 20000,
|
||||||
power: 18,
|
power: 18,
|
||||||
damageMultiplier: 1.8,
|
damageMultiplier: 2.2,
|
||||||
hitCount: 3,
|
hitCount: 3,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -212,7 +212,7 @@ class SkillData {
|
|||||||
mpCost: 15,
|
mpCost: 15,
|
||||||
cooldownMs: 6000,
|
cooldownMs: 6000,
|
||||||
power: 12,
|
power: 12,
|
||||||
damageMultiplier: 1.3,
|
damageMultiplier: 2.0,
|
||||||
);
|
);
|
||||||
|
|
||||||
/// A/B Test - 이중 공격
|
/// A/B Test - 이중 공격
|
||||||
@@ -223,7 +223,7 @@ class SkillData {
|
|||||||
mpCost: 35,
|
mpCost: 35,
|
||||||
cooldownMs: 12000,
|
cooldownMs: 12000,
|
||||||
power: 15,
|
power: 15,
|
||||||
damageMultiplier: 1.5,
|
damageMultiplier: 2.0,
|
||||||
hitCount: 2,
|
hitCount: 2,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -98,8 +98,9 @@ class CombatCalculator {
|
|||||||
final isParried = parryRoll < defenderParryRate;
|
final isParried = parryRoll < defenderParryRate;
|
||||||
|
|
||||||
// 3. 기본 데미지 계산 (0.8 ~ 1.2 변동)
|
// 3. 기본 데미지 계산 (0.8 ~ 1.2 변동)
|
||||||
|
// DEF 감산 비율: 0.3 (기존 0.5에서 축소하여 의미있는 피해 보장)
|
||||||
final damageVariation = 0.8 + rng.nextDouble() * 0.4;
|
final damageVariation = 0.8 + rng.nextDouble() * 0.4;
|
||||||
var baseDamage = (attackerAtk * damageVariation - defenderDef * 0.5);
|
var baseDamage = (attackerAtk * damageVariation - defenderDef * 0.3);
|
||||||
|
|
||||||
// 4. 크리티컬 판정
|
// 4. 크리티컬 판정
|
||||||
final criRoll = rng.nextDouble();
|
final criRoll = rng.nextDouble();
|
||||||
|
|||||||
@@ -85,12 +85,13 @@ class ItemService {
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
/// 아이템 스탯 생성 (레벨/희귀도/슬롯 기반)
|
/// 아이템 스탯 생성 (레벨/희귀도/슬롯 기반)
|
||||||
|
/// baseValue 공식: level * 1.2 * rarity (DEF 스케일링 축소)
|
||||||
ItemStats generateItemStats({
|
ItemStats generateItemStats({
|
||||||
required int level,
|
required int level,
|
||||||
required ItemRarity rarity,
|
required ItemRarity rarity,
|
||||||
required EquipmentSlot slot,
|
required EquipmentSlot slot,
|
||||||
}) {
|
}) {
|
||||||
final baseValue = (level * 2 * rarity.multiplier).round();
|
final baseValue = (level * 1.2 * rarity.multiplier).round();
|
||||||
|
|
||||||
return switch (slot) {
|
return switch (slot) {
|
||||||
EquipmentSlot.weapon => _generateWeaponStats(baseValue, rarity),
|
EquipmentSlot.weapon => _generateWeaponStats(baseValue, rarity),
|
||||||
|
|||||||
@@ -882,6 +882,12 @@ class ProgressService {
|
|||||||
nextState = _levelUp(nextState);
|
nextState = _levelUp(nextState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 모든 장비 슬롯을 목표 레벨에 맞는 장비로 교체 (전투 보상 드랍 공식 사용)
|
||||||
|
final equipLevel = nextState.traits.level;
|
||||||
|
for (var slotIndex = 0; slotIndex < Equipment.slotCount; slotIndex++) {
|
||||||
|
nextState = mutations.winEquipByIndex(nextState, equipLevel, slotIndex);
|
||||||
|
}
|
||||||
|
|
||||||
// 태스크 바 완료 처리
|
// 태스크 바 완료 처리
|
||||||
var progress = nextState.progress.copyWith(
|
var progress = nextState.progress.copyWith(
|
||||||
task: nextState.progress.task.copyWith(
|
task: nextState.progress.task.copyWith(
|
||||||
|
|||||||
@@ -68,8 +68,8 @@ class SkillService {
|
|||||||
// 적 방어력 감소 적용
|
// 적 방어력 감소 적용
|
||||||
final effectiveMonsterDef = monster.def * (1 - skill.targetDefReduction);
|
final effectiveMonsterDef = monster.def * (1 - skill.targetDefReduction);
|
||||||
|
|
||||||
// 최종 데미지 계산 (방어력 감산)
|
// 최종 데미지 계산 (방어력 감산 0.3)
|
||||||
final finalDamage = (buffedDamage - effectiveMonsterDef * 0.5)
|
final finalDamage = (buffedDamage - effectiveMonsterDef * 0.3)
|
||||||
.round()
|
.round()
|
||||||
.clamp(1, 9999);
|
.clamp(1, 9999);
|
||||||
|
|
||||||
@@ -626,8 +626,8 @@ class SkillService {
|
|||||||
// 적 방어력 감소 적용
|
// 적 방어력 감소 적용
|
||||||
final effectiveMonsterDef = monster.def * (1 - skill.targetDefReduction);
|
final effectiveMonsterDef = monster.def * (1 - skill.targetDefReduction);
|
||||||
|
|
||||||
// 최종 데미지 계산 (방어력 감산)
|
// 최종 데미지 계산 (방어력 감산 0.3)
|
||||||
final finalDamage = (buffedDamage - effectiveMonsterDef * 0.5)
|
final finalDamage = (buffedDamage - effectiveMonsterDef * 0.3)
|
||||||
.round()
|
.round()
|
||||||
.clamp(1, 9999);
|
.clamp(1, 9999);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user