Compare commits

..

No commits in common. "b59f8a09bd02d34a0db54753a5d65b2327a17e98" and "cb5842a32ba0d59516c2dc34af85751346fa3843" have entirely different histories.

View File

@ -1,166 +0,0 @@
using Godot;
using System;
public partial class UI : Node2D
{
[Export]
private byte Strength = 5;
[Export]
private byte Perception = 5;
[Export]
private byte Endurance = 5;
[Export]
private byte Charisma = 5;
[Export]
private byte Intelligence = 5;
[Export]
private byte Agility = 5;
[Export]
private byte Luck = 5;
private List<string> = context;
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
GD.Randomize();
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
context = new List<string>();
}
public bool StrengthCheck(byte difficulty)
{
uint score = 0;
for (byte i = 0; i < Strength; i++)
{
score += GD.Randi() % 6 + 1;
}
if (score >= difficulty)
{
return true;
}
else
{
return false;
}
}
public bool PerceptionCheck(byte difficulty)
{
uint score = 0;
for (byte i = 0; i < Perception; i++)
{
score += GD.Randi() % 6 + 1;
}
if (score >= difficulty)
{
return true;
}
else
{
return false;
}
}
public bool EnduranceCheck(byte difficulty)
{
uint score = 0;
for (byte i = 0; i < Endurance; i++)
{
score += GD.Randi() % 6 + 1;
}
if (score >= difficulty)
{
return true;
}
else
{
return false;
}
}
public bool CharismaCheck(byte difficulty)
{
uint score = 0;
for (byte i = 0; i < Charisma; i++)
{
score += GD.Randi() % 6 + 1;
}
if (score >= difficulty)
{
return true;
}
else
{
return false;
}
}
public bool IntelligenceCheck(byte difficulty)
{
uint score = 0;
for (byte i = 0; i < Intelligence; i++)
{
score += GD.Randi() % 6 + 1;
}
if (score >= difficulty)
{
return true;
}
else
{
return false;
}
}
public bool AgilityCheck(byte difficulty)
{
uint score = 0;
for (byte i = 0; i < Agility; i++)
{
score += GD.Randi() % 6 + 1;
}
if (score >= difficulty)
{
return true;
}
else
{
return false;
}
}
public bool LuckCheck(byte difficulty)
{
uint score = 0;
for (byte i = 0; i < Luck; i++)
{
score += GD.Randi() % 6 + 1;
}
if (score >= difficulty)
{
return true;
}
else
{
return false;
}
}
public bool isJSON(string text)
{
return text.Contains('{') || text.Contains('}');
}
}