Files
Darklings-FightingGame/Assets/_Project/Scripts/ScriptableObjectScripts/PlayerStatsSO.cs

159 lines
3.9 KiB
C#
Raw Normal View History

2021-08-20 11:16:49 +02:00
using UnityEngine;
using UnityEngine.U2D.Animation;
2021-08-20 11:16:49 +02:00
[CreateAssetMenu(fileName = "Player Stats", menuName = "Scriptable Objects/Player Stat", order = 1)]
public class PlayerStatsSO : ScriptableObject
{
2022-10-07 14:54:38 +03:00
[Header("Main")]
public int characterIndex;
public Sprite[] portraits;
public AnimationSO _animation;
public DialogueSO _dialogue;
2022-12-15 21:13:43 +02:00
public EffectsLibrarySO _effectsLibrary;
public EffectsLibrarySO _particlesLibrary;
2023-01-12 19:12:56 +02:00
public EffectsLibrarySO _projectilesLibrary;
2022-10-07 14:54:38 +03:00
public CharacterTypeEnum characterName;
[Header("Stats")]
public int defenseLevel;
public int arcanaLevel;
public int speedLevel;
2022-11-03 21:06:48 +02:00
public int jumpLevel;
public int dashLevel;
2022-10-07 14:54:38 +03:00
public bool canDoubleJump = true;
2023-01-03 22:34:07 +02:00
public int arcanaRecharge = 1;
2022-10-07 14:54:38 +03:00
[Header("Moves")]
public AttackSO m2L;
public AttackSO m5L;
public AttackSO m2M;
public AttackSO m5M;
public AttackSO m2H;
public AttackSO m5H;
public AttackSO jL;
public AttackSO jM;
2022-11-28 02:57:32 +02:00
public AttackSO jH;
2022-10-07 14:54:38 +03:00
public AttackSO mThrow;
public AttackSO mParry;
2022-10-21 21:20:37 +03:00
public AttackSO mRedFrenzy;
2022-10-07 14:54:38 +03:00
public ArcanaSO m5Arcana;
public ArcanaSO m2Arcana;
public ArcanaSO jArcana;
[HideInInspector] public int maxHealth = 10000;
2022-09-05 22:07:12 +03:00
2023-01-03 22:34:07 +02:00
public int Arcana { get { return arcanaLevel * ARCANA_MULTIPLIER; } set { } }
2022-10-07 14:54:38 +03:00
public float Defense { get { return (defenseLevel - 1) * 0.05f + 0.95f; } set { } }
2023-07-02 23:17:37 +03:00
public DemonFloat SpeedWalk
2022-11-03 21:06:48 +02:00
{
get
{
2023-10-01 13:19:40 +03:00
return speedLevel switch
2022-11-03 21:06:48 +02:00
{
1 => (DemonFloat)0.45,
2 => (DemonFloat)0.62,
3 => (DemonFloat)0.75,
2023-10-01 13:19:40 +03:00
_ => (DemonFloat)0,
};
2022-11-03 21:06:48 +02:00
}
set { }
}
2023-07-02 23:17:37 +03:00
public DemonFloat SpeedWalkBackwards
2023-04-24 01:19:26 +03:00
{
get
{
2023-10-01 13:19:40 +03:00
return speedLevel switch
2023-04-24 01:19:26 +03:00
{
1 => (DemonFloat)0.39,
2 => (DemonFloat)0.58,
3 => (DemonFloat)0.72,
2023-10-01 13:19:40 +03:00
_ => (DemonFloat)0,
};
2023-04-24 01:19:26 +03:00
}
set { }
}
2023-07-02 23:17:37 +03:00
public DemonFloat SpeedRun
2022-11-03 21:06:48 +02:00
{
get
{
2023-10-01 13:19:40 +03:00
return speedLevel switch
2022-11-03 21:06:48 +02:00
{
2023-10-01 13:19:40 +03:00
1 => (DemonFloat)2.3,
2 => (DemonFloat)2.7,
3 => (DemonFloat)3.1,
_ => (DemonFloat)0,
};
2022-11-03 21:06:48 +02:00
}
set { }
}
2023-07-02 23:17:37 +03:00
public DemonFloat JumpForce
2022-11-03 21:06:48 +02:00
{
get
{
2023-10-01 13:19:40 +03:00
return jumpLevel switch
2022-11-03 21:06:48 +02:00
{
1 => (DemonFloat)4.44,
2 => (DemonFloat)4.6,
3 => (DemonFloat)4.92,
2023-10-01 13:19:40 +03:00
_ => (DemonFloat)0,
};
2022-11-03 21:06:48 +02:00
}
set { }
}
2023-07-02 23:17:37 +03:00
public DemonFloat DashForce
2022-11-03 21:06:48 +02:00
{
get
{
2023-10-01 13:19:40 +03:00
return dashLevel switch
2022-11-03 21:06:48 +02:00
{
2023-10-01 13:19:40 +03:00
1 => (DemonFloat)3.5,
2 => (DemonFloat)3.7,
3 => (DemonFloat)3.9,
_ => (DemonFloat)0,
};
2023-04-12 01:27:02 +03:00
}
set { }
}
2023-07-02 23:17:37 +03:00
public DemonFloat DashBackForce
2023-04-12 01:27:02 +03:00
{
get
{
2023-10-01 13:19:40 +03:00
return dashLevel switch
2023-04-12 01:27:02 +03:00
{
2023-10-01 13:19:40 +03:00
1 => (DemonFloat)2.8,
2 => (DemonFloat)3.0,
3 => (DemonFloat)3.2,
_ => (DemonFloat)0,
};
2022-11-03 21:06:48 +02:00
}
set { }
}
2023-07-02 23:17:37 +03:00
public DemonFloat DashAirForce
2023-04-18 23:23:24 +03:00
{
get
{
2023-10-01 13:19:40 +03:00
return dashLevel switch
2023-04-18 23:23:24 +03:00
{
2023-10-01 13:19:40 +03:00
1 => (DemonFloat)3.3,
2 => (DemonFloat)3.5,
3 => (DemonFloat)3.7,
_ => (DemonFloat)0,
};
2023-04-18 23:23:24 +03:00
}
set { }
}
2023-07-02 23:17:37 +03:00
public DemonFloat DashBackAirForce
2023-04-18 23:23:24 +03:00
{
get
{
2023-10-01 13:19:40 +03:00
return dashLevel switch
2023-04-18 23:23:24 +03:00
{
2023-10-01 13:19:40 +03:00
1 => (DemonFloat)2.8,
2 => (DemonFloat)3.0,
3 => (DemonFloat)3.2,
_ => (DemonFloat)0,
};
2023-04-18 23:23:24 +03:00
}
set { }
}
2023-01-03 22:34:07 +02:00
public const int ARCANA_MULTIPLIER = 1000;
2021-08-20 11:16:49 +02:00
}