Esempio n. 1
0
        public void bless(Node target)
        {
            if (this.org == target.org)
            {
                return;                                                        //don't bless self--decreaseOomph below increases effect of decreaseHunger
            }
            float thisSends      = Mathf.Min(target.hunger(), this.oomph / 2); //donate half of what you've got
            float targetReceives = thisSends * linkEfficiency(this, target);

            this.oomph   -= thisSends;
            target.oomph += targetReceives;

            if (CScommon.testBit(target.dna, CScommon.goalBit) && target.teamNumber == this.teamNumber)
            {
                Score.addToProductivity(this.id, targetReceives);                                                                                                    //I only get credit for what they receive
            }
        }
Esempio n. 2
0
        //cuts links from this organism to loser organism
        //	private void cutOrgsMusclesToOrg(Org org){
        //		foreach (var memb in org.members) memb.cutMusclesTargetingOrg(org);
        //	}



        public bool isEater()
        {
            return(CScommon.testBit(dna, CScommon.eaterBit) && !org.isServant());
        }