public void increaseNumberOfEvolutionPoints(Fact fact)
        {
            int amount = 0;

            fact.CallComponents <IIncreaseEvolutionPool>(i => { amount += i.getAmount(); });
            evolution_points[fact] = amount;
        }
Esempio n. 2
0
        public bool worksOn(ItemEntityWeapon weapon)
        {
            bool res = false;

            fact?.CallComponents <KineticistEnergizeWeapon>(c => res = c.worksOn(weapon));

            return(res);
        }
        protected bool check <T>(Fact buff, Predicate <T> pred) where T : BlueprintComponent
        {
            if (!buffs.Contains(buff))
            {
                return(false);
            }
            if (lock_map[buff])
            {
                return(false);
            }
            lock_map[buff] = true;

            bool res = false;

            buff.CallComponents <T>(c => res = pred(c));
            lock_map[buff] = false;
            return(res);
        }
        public bool addBuff(Fact fact)
        {
            int new_bleed_amount = 0;

            fact?.CallComponents <BleedBuff>(c => new_bleed_amount = c.getAverageBleedAmount());

            int old_bleed_amount = 0;

            bleed_buff?.CallComponents <BleedBuff>(c => old_bleed_amount = c.getAverageBleedAmount());


            if (old_bleed_amount < new_bleed_amount)
            {
                //(bleed_buff as Buff)?.Remove();
                bleed_buff = fact;
                return(true);
            }
            else
            {
                return(false);
            }
        }