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; }
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(); }
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"; }
public WeaponEffect(SectionWeapon effectedWeapon) : this() { appliedWeapon = effectedWeapon; }
public DamageOverTime(SectionWeapon effectedWeapon) : base(effectedWeapon) { this.effectType = "Burn"; }
public AreaOfEffect(SectionWeapon effectedWeapon) : base(effectedWeapon) { this.effectType = "Multi"; }
public Blind(SectionWeapon effectedWeapon) : base(effectedWeapon) { this.effectType = "Blind"; }
public Drain(SectionWeapon effectedWeapon) : base(effectedWeapon) { this.effectType = "Drain"; }
public Blinded(int blindPercentage, SectionWeapon effectedWeapon) : base(effectedWeapon) { missPercentage = blindPercentage; }
public Blinded(int blindPercentage, SectionWeapon effectedWeapon, Section s) : base(effectedWeapon) { this.effectType = "Blinded"; }
public Paralyze(SectionWeapon effectedWeapon) : base(effectedWeapon) { this.effectType = "Paralyze"; }
public AimCritStrike(SectionWeapon effectedWeapon) : base(effectedWeapon) { this.effectType = "Tag Section"; }
public Burn(SectionWeapon effectedWeapon) : base(effectedWeapon) { this.effectType = "Burn"; }
private int EncodeWeapon(SectionWeapon w) { return GetTower().faction.EncodeSectionWeapon(w.wtype); }
public static void BuildSection(Player p, Tower t, SectionMaterial material, SectionWeapon weapon) { instance.StartBuild(p, t, material, weapon); }