1
0
mirror of https://github.com/Melon-Bread/Pet.GB synced 2024-11-28 13:58:20 -05:00

Updated Gel 💧

Stoped the player from making an action before finishing last action.
Punished the player for overfeeding the Gel. Renamed Mood.NORMAL to the
more fitting Mood.NEUTRAL.
This commit is contained in:
Rain Clark 2016-10-04 04:11:36 -04:00
parent 2b4356bf91
commit f32419cb34

View File

@ -10,7 +10,7 @@ class Gel extends FlxSprite
private var MAX_LEVEL(default, never):Int = 100; private var MAX_LEVEL(default, never):Int = 100;
// Usless Stats that have no pupose yet // Usless Stats that have no pupose yet
public var Int:Int = 0; public var Int:Int = 1; // had to be somewhat smart to get out of the egg
public var Age:Int = 0; public var Age:Int = 0;
// Mood Modifiers // Mood Modifiers
@ -25,9 +25,10 @@ class Gel extends FlxSprite
private var _madeWaste:Bool = false; private var _madeWaste:Bool = false;
// Mood // Mood
private var _currentMood:Mood = NORMAL; private var _currentMood:Mood = NEUTRAL;
//
public var Wait:Bool = false;
public function new(?X:Float=0, ?Y:Float=0) public function new(?X:Float=0, ?Y:Float=0)
{ {
@ -38,6 +39,7 @@ class Gel extends FlxSprite
// DEBUG // DEBUG
FlxG.watch.add(this, "Wait");
FlxG.watch.add(this, "Happiness"); FlxG.watch.add(this, "Happiness");
FlxG.watch.add(this, "Fullness"); FlxG.watch.add(this, "Fullness");
} }
@ -55,14 +57,22 @@ class Gel extends FlxSprite
} }
/*
*
*/
public function EatFood():Void public function EatFood():Void
{ {
Wait = true;
// Stat changes // Stat changes
Fullness += 25;
Happiness += 10; if ((Fullness + 25) > 100)
{
Happiness -= 5; // Unhappy from over feeding
// TODO: Add another penelty
}
else
{
Fullness += 25;
Happiness += 10;
}
checkRange(); checkRange();
} }
@ -88,7 +98,7 @@ class Gel extends FlxSprite
enum Mood enum Mood
{ {
NORMAL; NEUTRAL;
HAPPY; HAPPY;
ANGRY; ANGRY;
HUNGRY; HUNGRY;