You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

76 lines
2.1 KiB

using BigFloatNumerics;
using IVDataFormat;
using System;
using System.Numerics;
using UnityEngine;
[CreateAssetMenu(fileName = "AtlantisDungeonProperty", menuName = "ScriptableObject/GameMod/AtlantisDungeonProperty")]
public class AtlantisDungeonProperty : GameModProperty
{
[Serializable]
public struct GoodsCreator
{
public ItemProp itemProp;
public float startCount;
public float multiplierPerLevel;
public float adderPerLevel;
public BigInteger GetCount(uint level)
{
return Formula.Calculate(startCount, multiplierPerLevel, adderPerLevel, level);
}
}
[Serializable]
public struct EnemyCreator
{
[Serializable]
struct StatProperty
{
public float baseV;
public float multiplierPerLevel;
public float adderPerLevel;
}
public CharacterProperty[] candidates;
public int countPerWave;
public int score;
[SerializeField] StatProperty hpStat;
[SerializeField] StatProperty atkStat;
public BigFloat GetHp(uint level)
{
return Formula.Calculate(hpStat.baseV, hpStat.multiplierPerLevel, hpStat.adderPerLevel, level);
}
public BigFloat GetAtk(uint level)
{
return Formula.Calculate(atkStat.baseV, atkStat.multiplierPerLevel, atkStat.adderPerLevel, level);
}
}
public static string CodeName => "AtlantisDungeon";
public override string codeName => CodeName;
public int openStage = 1;
public int waveCount = 1;
public float waveIntervalTime = 1;
public float goalScore = 1;
public EnemyCreator normalEnemyCreator;
public EnemyCreator epicEnemyCreator;
public float limitTime = 1f;
public GoodsCreator[] rewards;
public override GameModData CreateData(GameModPlayProperty playProperty)
{
Debug.Assert(playProperty is AtlantisDungeonPlayProperty, "Invalid play property type.");
return new AtlantisDungeonData(this, playProperty as AtlantisDungeonPlayProperty);
}
}