From 67406a0c688c30c65dedda47c75fbe8004912055 Mon Sep 17 00:00:00 2001 From: Harbinger Date: Sun, 7 Oct 2012 00:02:18 -0700 Subject: [PATCH] Fix for demons gaining 50 body parts. --- src/org/sevenchan/dongs/Creature.as | 34 ++++++++++++++++++++++++++++++++++ src/org/sevenchan/dongs/Town.as | 4 ++-- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/org/sevenchan/dongs/Creature.as b/src/org/sevenchan/dongs/Creature.as index eb20f12..b7f377e 100644 --- a/src/org/sevenchan/dongs/Creature.as +++ b/src/org/sevenchan/dongs/Creature.as @@ -89,10 +89,44 @@ package org.sevenchan.dongs public function Creature() { trace("Creature.init()"); + clearFuckingEverything(); + _gold = MathUtils.rand(0, 50); _mana = maxMana; } + /** + * IF YOU ADD ANY NEW VARIABLES TO THIS CLASS, RESET THEM TO DEFAULT VALUES HERE! + */ + private function clearFuckingEverything():void { + _level = 0; // In comparison to standard human being. No attacking rats for 20 levels. + d_level = 0; // Delta + _strength = 1; // Damage caused in case of a successful attack. + _speed = 1; // Chance of dodging [0-1]. defending.speed-attacking.speed = relative chance of dodging. + _intellect = 1; // Smartness. Opens dialog trees and gives hints. + _lust = 1; // Slowly increases over time, eliminated by masturbation or smecks. Some battles are nonsexual and will not affect lust, others will slightly increase it based on ((number of balls x ball hormone output)+(number of vaginas * vagina hormone output)* sensitivity). + _sensitivity = 0; // 0-1, 0 being not sensitive + _HP = 100; //100*(level*0.02) + _XP = 0; // 50*(level*0.5) + _mana = 0; // Magic shit, increases over time, especially near relaxing places. + _gold = 0; // Currency + + _abilities = new Object(); + _assholes = new Vector.(); + _arms = new Vector.(); + _balls = new Vector.(); + _breasts = new Vector.(); + _dicks = new Vector.(); + enchantments = new Object(); + _eyes = new Vector.(); + inventory = new Vector.(); + _legs = new Vector.(); + _vaginas = new Vector.(); + _wings = new Vector.(); + explored = new Vector.(); + clothing = new Vector.(); + } + public function addBreast():Breast { trace("USING CREATURE.ADDBREAST INSTEAD OF OVERRIDING"); diff --git a/src/org/sevenchan/dongs/Town.as b/src/org/sevenchan/dongs/Town.as index 227a1eb..2adbac9 100644 --- a/src/org/sevenchan/dongs/Town.as +++ b/src/org/sevenchan/dongs/Town.as @@ -144,7 +144,7 @@ package org.sevenchan.dongs { case 0: var c:Creature = getRandomInhabitant(); - if (c == null) + if (c != null) { if (c.getHostile(main.player)) { @@ -592,7 +592,7 @@ package org.sevenchan.dongs public function getRandomInhabitant():Creature { - for each (var type:Object in inhabitants) + for (var type:Object in inhabitants) { var c:Creature = type as Creature; var rnd:Number = Math.random(); -- 2.11.4.GIT