Example #1
0
    protected int weightPercentageModifier = 20; //Percentage of weight shift

    #endregion Fields

    #region Constructors

    public AlterWeight(SectionWeapon effectedWeapon)
        : base(effectedWeapon)
    {
        this.effectType = "Weight Modification";
        canAttackSelf = true;
        modifiedSecs = new Dictionary<Section, int>();
    }
 public SectionAttributes(SectionMaterial newMat, SectionWeapon newWeapon)
 {
     this.material = newMat;
     this.weapon = newWeapon;
     this.sp = this.material.GetInitialSP();
     this.maxSP = this.material.GetMaxSP() - this.weapon.GetSPCost();
     this.height = 0;
 }
Example #3
0
 public Build(int t, SectionMaterial m, SectionWeapon w)
     : base("Build")
 {
     this.playerNumber = TurnOrder.myPlayer.playerNumber;
     this.towerNumber = t;
     this.material = EncodeMaterial(m);
     this.weapon = EncodeWeapon(w);
     this.cost = m.GetCost() + w.GetCost();
 }
Example #4
0
 private void StartBuild(Player player, Tower t, SectionMaterial m, SectionWeapon w)
 {
     GameObject block = null;
     GameObject weapon = null;
     Section topOfTower = t.GetTopSection();
     GameObject playerSpot = t.towerBase.towerPoint;
     if(topOfTower == null) {
         spawnPoint.transform.position = playerSpot.transform.position;
         spawnPoint.transform.Translate(0,25,0);
     } else {
         Vector3 old = playerSpot.transform.position;
         spawnPoint.transform.position = new Vector3(old.x, topOfTower.collider.bounds.max.y, old.z);
         spawnPoint.transform.Translate(0,25,0);
     }
     block = Instantiate(m.GetPrefab(),spawnPoint.transform.position,Quaternion.identity) as GameObject;
     if(player.playerNumber == 1)
     {
         block.transform.rotation = Quaternion.AngleAxis(90, Vector3.up);
     }
     else if(player.playerNumber ==2)
     {
         block.transform.rotation = Quaternion.AngleAxis(-90, Vector3.up);
     }
     block.transform.Find("FireCam").camera.enabled = false;
     block.transform.Find("HitCam").camera.enabled = false;
     block.transform.Find("CollapseCam").camera.enabled = false;
     if (w.wtype != "Nothing"){
         weapon = Instantiate(w.GetPrefab()) as GameObject; //I believe the here lies the issue for why building Nothing doesn't work? maybe.
         if(player.playerNumber == 1)
         {
             weapon.transform.rotation = Quaternion.AngleAxis(90, Vector3.up);
         }
         else if(player.playerNumber ==2)
         {
             weapon.transform.rotation = Quaternion.AngleAxis(-90, Vector3.up);
         }
     //if(weapon != null) {
         Vector3 localScale = weapon.transform.localScale;
         weapon.transform.parent = block.transform;
         weapon.transform.localPosition = block.transform.Find("WeaponLocation").localPosition;
         weapon.transform.localScale = localScale;
     }
     Section sc = block.GetComponent<Section>();
     SectionAttributes s = new SectionAttributes(m, w);
     sc.attributes = s;
     player.Build(sc, t);
     TowerSelection.LocalSelectSection(t, sc.attributes.height);
 }
 public DefaultWeaponEffect(SectionWeapon effectedWeapon)
     : base(effectedWeapon)
 {
     this.effectType = "none";
 }
    protected int poisonedDamageModifier = 30; //Percentage of bonus damage a crit strike will do.

    #endregion Fields

    #region Constructors

    public PoisonedSplash(SectionWeapon effectedWeapon)
        : base(effectedWeapon)
    {
        this.effectType = "Posioned";
    }
Example #7
0
 public WeaponEffect(SectionWeapon effectedWeapon)
     : this()
 {
     appliedWeapon = effectedWeapon;
 }
 public DamageOverTime(SectionWeapon effectedWeapon)
     : base(effectedWeapon)
 {
     this.effectType = "Burn";
 }
Example #9
0
 public AreaOfEffect(SectionWeapon effectedWeapon)
     : base(effectedWeapon)
 {
     this.effectType = "Multi";
 }
Example #10
0
 public Blind(SectionWeapon effectedWeapon)
     : base(effectedWeapon)
 {
     this.effectType = "Blind";
 }
Example #11
0
 public Drain(SectionWeapon effectedWeapon)
     : base(effectedWeapon)
 {
     this.effectType = "Drain";
 }
Example #12
0
 public Blinded(int blindPercentage, SectionWeapon effectedWeapon)
     : base(effectedWeapon)
 {
     missPercentage = blindPercentage;
 }
Example #13
0
 public Blinded(int blindPercentage, SectionWeapon effectedWeapon, Section s)
     : base(effectedWeapon)
 {
     this.effectType = "Blinded";
 }
Example #14
0
 public Paralyze(SectionWeapon effectedWeapon)
     : base(effectedWeapon)
 {
     this.effectType = "Paralyze";
 }
Example #15
0
 public AimCritStrike(SectionWeapon effectedWeapon)
     : base(effectedWeapon)
 {
     this.effectType = "Tag Section";
 }
Example #16
0
 public Burn(SectionWeapon effectedWeapon)
     : base(effectedWeapon)
 {
     this.effectType = "Burn";
 }
Example #17
0
 private int EncodeWeapon(SectionWeapon w)
 {
     return GetTower().faction.EncodeSectionWeapon(w.wtype);
 }
Example #18
0
 public static void BuildSection(Player p, Tower t, SectionMaterial material, SectionWeapon weapon)
 {
     instance.StartBuild(p, t, material, weapon);
 }