웨이브 몬스터 생성 및 점점 강해지게

This commit is contained in:
Ino 2025-02-03 08:29:11 +09:00
parent ca1c7c38de
commit 269475c9e3
7 changed files with 70 additions and 12 deletions

View File

@ -1 +1 @@
[{"e_DungeonType": "맵 종류", "n_MapLv": "맵 Lv", "n_MobCount": "등장 몬스터 수", "n_SpawnID": "AppearTable", "n_MobID": "MonsterListTable", "f_MakeGap": "생성 주기", "f_Time": "제한 시간(초)"}, {"e_DungeonType": "d1_Mimic", "n_MapLv": "1", "n_MobCount": "50", "n_SpawnID": "1", "n_MobID": "1001", "f_MakeGap": "0.4", "f_Time": "30"}, {"e_DungeonType": "d1_Mimic", "n_MapLv": "2", "n_MobCount": "60", "n_SpawnID": "2", "n_MobID": "1001", "f_MakeGap": "0.4", "f_Time": "30"}, {"e_DungeonType": "d2_Maze", "n_MapLv": "1", "n_MobCount": "20", "n_SpawnID": "1", "n_MobID": "0", "f_MakeGap": "0", "f_Time": "90"}, {"e_DungeonType": "d3_Nightmare", "n_MapLv": "1", "n_MobCount": "3", "n_SpawnID": "1", "n_MobID": "1003", "f_MakeGap": "0", "f_Time": "90"}, {"e_DungeonType": "d4_Wave", "n_MapLv": "1", "n_MobCount": "100", "n_SpawnID": "1", "n_MobID": "0", "f_MakeGap": "10", "f_Time": "1800"}]
[{"e_DungeonType": "맵 종류", "n_MapLv": "맵 Lv", "n_MobCount": "등장 몬스터 수", "n_SpawnID": "AppearTable", "n_MobID": "MonsterListTable", "f_MakeGap": "생성 주기", "f_Time": "제한 시간(초)", "f_Increase": "강해지는 비율"}, {"e_DungeonType": "d1_Mimic", "n_MapLv": "1", "n_MobCount": "50", "n_SpawnID": "1", "n_MobID": "1001", "f_MakeGap": "0.4", "f_Time": "30", "f_Increase": "0"}, {"e_DungeonType": "d1_Mimic", "n_MapLv": "2", "n_MobCount": "60", "n_SpawnID": "2", "n_MobID": "1001", "f_MakeGap": "0.4", "f_Time": "30", "f_Increase": "0"}, {"e_DungeonType": "d2_Maze", "n_MapLv": "1", "n_MobCount": "20", "n_SpawnID": "1", "n_MobID": "0", "f_MakeGap": "0", "f_Time": "90", "f_Increase": "0.5"}, {"e_DungeonType": "d3_Nightmare", "n_MapLv": "1", "n_MobCount": "3", "n_SpawnID": "1", "n_MobID": "1003", "f_MakeGap": "0", "f_Time": "90", "f_Increase": "0"}, {"e_DungeonType": "d4_Wave", "n_MapLv": "1", "n_MobCount": "100", "n_SpawnID": "1", "n_MobID": "0", "f_MakeGap": "60", "f_Time": "1800", "f_Increase": "0.1"}]

Binary file not shown.

View File

@ -1767,7 +1767,7 @@ public class Actor : MyCoroutine
return true;
case NavMeshPathStatus.PathPartial:
++FindCount;
Debug.Log($"Path Partial. Attempt: {FindCount}");
//Debug.Log($"Path Partial. Attempt: {FindCount}");
if (FindCount > 5)
{
FindCount = 0;

View File

@ -12,7 +12,7 @@ public class MobActor : Actor
protected int m_SpawnerId;
protected eMobStatus MobStatus;
Vector3 OriginalPos, TargetPatrolPos;
float m_PatrolDelay, m_DieTime;
float m_PatrolDelay, m_DieTime, f_BaseChaseRange;
bool b_IsFirstAttack, NoUpdate_byTool;
protected MonsterAppearData m_MonsterAppearData;
protected MonsterTableData m_MonsterTableData;
@ -61,6 +61,7 @@ public class MobActor : Actor
m_AttackType = m_MonsterTableData.e_AttackType;
b_IsFirstAttack = m_MonsterTableData.b_IsFirstAttack;
f_BaseChaseRange = m_MonsterTableData.f_BaseChaseRange;
//var chapter = InGameInfo.Ins.Get_CurStageData().Chapter;
//if (IsBoss && chapter < 101) { GameUI.Ins.IngameUI.m_BossInfoUI.Set(m_MonsterTableData.Get_Name()); }
@ -87,6 +88,12 @@ public class MobActor : Actor
InGameInfo.Ins.Show_Effect("Effect_MonsterSpawn", pos);
//GameUI.Ins.IngameUI.m_ChapterQuest.Add_PurposeCount(new ChapterQuestAddData { purpose = ePurpose.MeetMob, mobid = m_MonsterTableData.n_MonsterID });
}
public void Set(int iteration, bool isFirstAttack, float chaseRange)
{
b_IsFirstAttack = isFirstAttack;
f_BaseChaseRange *= chaseRange;
m_Stat.Set_Wave(iteration);
}
public override void On_Regen()
{
base.On_Regen();
@ -254,7 +261,7 @@ public class MobActor : Actor
{
if (b_IsFirstAttack)
{ // 선공이고, 플레이어가 추적 범위 안에 들어오면 전투 상태로 전환
var enemies = ActorInfo.Ins.Get_EnemyActors(IsEnemy(), Get_position(), m_MonsterTableData.f_BaseChaseRange);
var enemies = ActorInfo.Ins.Get_EnemyActors(IsEnemy(), Get_position(), f_BaseChaseRange);
if (enemies.Count > 0)
Change_MobStatus(eMobStatus.Battle);
}

View File

@ -115,16 +115,18 @@ public class DungeonInfo : MonoBehaviourSingletonTemplate<DungeonInfo>
}
}
}
void Make_Mob(eSubRol subrol, MonsterTableData mobData, DungeonMapConfigTableData dgData, float minDist, float MaxDist)
void Make_Mob(eSubRol subrol, MonsterTableData mobData, DungeonMapConfigTableData dgData, Vector3 makepos,
float minDist, float MaxDist, Action<MobActor> act = null)
{
AddrResourceMgr.Ins.LoadObject<GameObject>(mobData.s_MonsterPrefab, handle =>
{
var mob = DSUtil.Get_Clone<MobActor>(handle.Result);
ActorInfo.Ins.Add_Actor(mob, eRole.Mob, dgData.n_SpawnID, mobData.s_MonsterPrefab);
mob.Set(true, null, null, dgData.n_SpawnID, false);
var rdnpos = DSUtil.Get_RandomPos_onNavMesh(MyValue.MyPC.Get_position(), minDist, MaxDist);
var rdnpos = DSUtil.Get_RandomPos_onNavMesh(makepos, minDist, MaxDist);
mob.Set(mobData, rdnpos, Set_MobDie, 0);
mob.m_SubRole = subrol;
act?.Invoke(mob);
});
}
@ -145,7 +147,7 @@ public class DungeonInfo : MonoBehaviourSingletonTemplate<DungeonInfo>
case eDungeon.d1_Mimic: StartCoroutine(Co_Update_Mimic()); break;
case eDungeon.d2_Maze: StartCoroutine(Co_Update_Maze()); break;
case eDungeon.d3_Nightmare: StartCoroutine(Co_Update_Nightmare()); break;
case eDungeon.d4_Wave: break;
case eDungeon.d4_Wave: StartCoroutine(Co_Update_Wave()); break;
}
}
IEnumerator Co_Update_Mimic()
@ -161,7 +163,7 @@ public class DungeonInfo : MonoBehaviourSingletonTemplate<DungeonInfo>
while (mobCount > 0)
{
--mobCount;
Make_Mob(eSubRol.Mimic, mimicData, dungeonData, min, max);
Make_Mob(eSubRol.Mimic, mimicData, dungeonData, MyValue.MyPC.Get_position(), min, max);
yield return new WaitForSeconds(dungeonData.f_MakeGap);
}
}
@ -171,12 +173,12 @@ public class DungeonInfo : MonoBehaviourSingletonTemplate<DungeonInfo>
float min = 10f, max = 20f;
var dgData = MyValue.MyChoiceMapData.Get_DungeonMapData_orNull();
for (int i = 0; i < dgData.n_MobCount; i++)
Make_Mob(eSubRol.None, table_monsterlist.Ins.Get_RandomData(eSubRol.None), dgData, min, max);
Make_Mob(eSubRol.None, table_monsterlist.Ins.Get_RandomData(eSubRol.None), dgData, MyValue.MyPC.Get_position(), min, max);
if (m_MazeClear >= 5)
{
m_MazeClear = 0;
Make_Mob(eSubRol.Boss, table_monsterlist.Ins.Get_RandomData(eSubRol.Boss), dgData, min, max);
Make_Mob(eSubRol.Boss, table_monsterlist.Ins.Get_RandomData(eSubRol.Boss), dgData, MyValue.MyPC.Get_position(), min, max);
}
yield return new WaitForSeconds(1f);
@ -198,7 +200,8 @@ public class DungeonInfo : MonoBehaviourSingletonTemplate<DungeonInfo>
var dgData = MyValue.MyChoiceMapData.Get_DungeonMapData_orNull();
for (int i = 0; i < dgData.n_MobCount; i++)
{
Make_Mob(eSubRol.Boss, table_monsterlist.Ins.Get_RandomData(eSubRol.Boss), dgData, 10, 25);
var boss = table_monsterlist.Ins.Get_RandomData(eSubRol.Boss);
Make_Mob(eSubRol.Boss, boss, dgData, MyValue.MyPC.Get_position(), 10, 25);
yield return new WaitForSeconds(30f);
}
}
@ -213,6 +216,31 @@ public class DungeonInfo : MonoBehaviourSingletonTemplate<DungeonInfo>
act_DamageUI?.Invoke(m_TotalDamage);
}
IEnumerator Co_Update_Wave()
{
yield return new WaitForSeconds(1f);
StartCoroutine(Co_Update_Time());
float min = 0f, max = 15f;
var mapdata = MyValue.MyChoiceMapData.Get_MapData();
var dungeonData = MyValue.MyChoiceMapData.Get_DungeonMapData_orNull();
int iteration = 0;
while (true)
{
var mobCount = dungeonData.n_MobCount;
while (mobCount > 0)
{
--mobCount;
var mobData = table_monsterlist.Ins.Get_RandomData(eSubRol.None);
Make_Mob(eSubRol.None, mobData, dungeonData, Vector3.zero, min, max,
mob => { mob.Set(iteration, true, 25f); });
yield return new WaitForSeconds(0.5f);
}
yield return new WaitForSeconds(dungeonData.f_MakeGap);
++iteration;
}
}
public void Set_Wave(Action<int> actscoreui, Action<int> actlifeui)
{
WaveScore = 0;

View File

@ -49,6 +49,13 @@ public class DungeonMapConfigTableData : TableDataBase
set { _Time = value; _Time.RandomizeCryptoKey(); }
}
protected ObscuredFloat _Increase;
public float f_Increase
{
get { return _Increase; }
set { _Increase = value; _Increase.RandomizeCryptoKey(); }
}
public int Get_DungeonIndex() { return MyEnumToInt.Ins.Get_Int(e_DungeonType) - 1; }
}

View File

@ -952,11 +952,27 @@ public class ActorStatInfo
var keys = dic_StatValue.Keys.ToList();
foreach (var key in keys)
{
dic_StatValue[key] += dic_StatValue[key] * (lv * 0.5d);
dic_StatValue[key] += dic_StatValue[key] * (lv * MyValue.MyChoiceMapData.Get_DungeonMapData_orNull().f_Increase);
dic_StatValue[key].RandomizeCryptoKey();
}
}
}
public void Set_Wave(int iteration)
{
if (MyValue.MyChoiceMapData.Get_MapData().e_Dungeon == eDungeon.d4_Wave)
{
var keys = dic_StatValue.Keys.ToList();
foreach (var key in keys)
{
//if (key == eStat.BaseDmg && iteration > 0)
// Debug.Log($"전 {iteration} : {dic_StatValue[key]}");
dic_StatValue[key] += dic_StatValue[key] * (iteration * MyValue.MyChoiceMapData.Get_DungeonMapData_orNull().f_Increase);
dic_StatValue[key].RandomizeCryptoKey();
//if (key == eStat.BaseDmg && iteration > 0)
// Debug.Log($"후 {iteration} : {dic_StatValue[key]}");
}
}
}
public double Get_Stat(eStat key, int idkey = 0)
{