void OnModelSet()
        {
            ActorModel model = this.Model;

            m_Doll  = new Doll(model.DollBody);
            m_Sheet = new ActorSheet(model.StartingSheet);

            // starting points maxed.
            m_ActionPoints  = m_Doll.Body.Speed;
            m_HitPoints     = m_previousHitPoints = m_Sheet.BaseHitPoints;
            m_StaminaPoints = m_previousStamina = m_Sheet.BaseStaminaPoints;
            m_FoodPoints    = m_previousFoodPoints = m_Sheet.BaseFoodPoints;
            m_SleepPoints   = m_previousSleepPoints = m_Sheet.BaseSleepPoints;
            m_Sanity        = m_previousSanity = m_Sheet.BaseSanity;

            // create inventory.
            if (model.Abilities.HasInventory)
            {
                m_Inventory = new Inventory(model.StartingSheet.BaseInventoryCapacity);
            }

            // starting attacks.
            m_CurrentMeleeAttack  = model.StartingSheet.UnarmedAttack;
            m_CurrentDefence      = model.StartingSheet.BaseDefence;
            m_CurrentRangedAttack = Attack.BLANK;
        }
示例#2
0
 public ActorSheet(Gameplay.GameActors.ActorData src, int baseFoodPoints, int baseSleepPoints, int baseSanity, Verb unarmedAttack, int inventoryCapacity)
 {
     BaseHitPoints         = src.HP;
     BaseStaminaPoints     = src.STA;
     BaseFoodPoints        = baseFoodPoints;
     BaseSleepPoints       = baseSleepPoints;
     BaseSanity            = baseSanity;
     UnarmedAttack         = new Attack(AttackKind.PHYSICAL, unarmedAttack, src.ATK, src.DMG);
     BaseDefence           = new Defence(src.DEF, src.PRO_HIT, src.PRO_SHOT);
     BaseViewRange         = src.FOV;
     BaseAudioRange        = src.AUDIO;
     BaseSmellRating       = (float)src.SMELL / 100f;
     BaseInventoryCapacity = inventoryCapacity;
 }
 public ActorSheet(int baseHitPoints, int baseStaminaPoints,
                   int baseFoodPoints, int baseSleepPoints, int baseSanity,
                   Attack unarmedAttack, Defence baseDefence,
                   int baseViewRange, int baseAudioRange, int smellRating,
                   int inventoryCapacity)
 {
     this.BaseHitPoints         = baseHitPoints;
     this.BaseStaminaPoints     = baseStaminaPoints;
     this.BaseFoodPoints        = baseFoodPoints;
     this.BaseSleepPoints       = baseSleepPoints;
     this.BaseSanity            = baseSanity;
     this.UnarmedAttack         = unarmedAttack;
     this.BaseDefence           = baseDefence;
     this.BaseViewRange         = baseViewRange;
     this.BaseAudioRange        = baseAudioRange;
     this.BaseSmellRating       = smellRating / 100.0f;
     this.BaseInventoryCapacity = inventoryCapacity;
 }
示例#4
0
 public ActorSheet(ActorSheet copyFrom)
 {
     BaseHitPoints         = copyFrom.BaseHitPoints;
     BaseStaminaPoints     = copyFrom.BaseStaminaPoints;
     BaseFoodPoints        = copyFrom.BaseFoodPoints;
     BaseSleepPoints       = copyFrom.BaseSleepPoints;
     BaseSanity            = copyFrom.BaseSanity;
     UnarmedAttack         = copyFrom.UnarmedAttack;
     BaseDefence           = copyFrom.BaseDefence;
     BaseViewRange         = copyFrom.BaseViewRange;
     BaseAudioRange        = copyFrom.BaseAudioRange;
     BaseSmellRating       = copyFrom.BaseSmellRating;
     BaseInventoryCapacity = copyFrom.BaseInventoryCapacity;
     if (0 < copyFrom.SkillTable.CountSkills)
     {
         SkillTable = new SkillTable(copyFrom.SkillTable);
     }
 }