public void upgrade(PickUpItem.ItemType artifactType) { if (artifactType != PickUpItem.ItemType.HEALER_ARTIFACT && artifactType != PickUpItem.ItemType.LESSER_ARTIFACT) { return; } CmdHasArtifact(artifactType == PickUpItem.ItemType.HEALER_ARTIFACT); float modifier = 1.3f; if (hasArtifact) { modifier = 1.1f; } maxHealth *= modifier; currentHealth = maxHealth; initialMana /= modifier; healRate *= modifier; mana /= modifier; cooldownTime /= modifier; Debug.Log("Shield upgraded"); }
public void downgrade(PickUpItem.ItemType artifactType) { manaRegen /= 1.5f; if (artifactType == PickUpItem.ItemType.DAMAGE_ARTIFACT) { attackDamage /= 1.8f; attackEnvDamage /= 1.2f; attackRange /= 1.8f; // TODO extend effect! attackMana /= 1.2f; } else if (artifactType == PickUpItem.ItemType.HEALER_ARTIFACT) { heal /= 1.8f; shieldMana /= 1.2f; initialShieldMana /= 1.2f; maxShieldHealth /= 1.8f; // TODO shield type/size! } else if (artifactType == PickUpItem.ItemType.TELEPATH_ARTIFACT) { telekenMana /= 1.2f; telekenRange /= 1.8f; // TODO can hit humans and can teleken bigger blocks! } }
public override void upgrade(PickUpItem.ItemType artifactType) { if (artifactType != PickUpItem.ItemType.LESSER_ARTIFACT && artifactType != PickUpItem.ItemType.TELEPATH_ARTIFACT) { return; } hasArtifact = artifactType == PickUpItem.ItemType.TELEPATH_ARTIFACT; colisionDamage *= 1.5f; Debug.Log("Telekinesis upgraded"); }
public void setModel(PickUpItem.ItemType type) { if (type == PickUpItem.ItemType.DAMAGE_ARTIFACT) { damageModel.SetActive(true); effect.startColor = damageModel.GetComponent <MeshRenderer>().material.color; } else if (type == PickUpItem.ItemType.HEALER_ARTIFACT) { healthModel.SetActive(true); effect.startColor = healthModel.GetComponent <MeshRenderer>().material.color; } else if (type == PickUpItem.ItemType.TELEPATH_ARTIFACT) { telekenModel.SetActive(true); effect.startColor = telekenModel.GetComponent <MeshRenderer>().material.color; } }
public void upgrade(PickUpItem.ItemType artifactType) { // Remove previous artifact effects if (artifactType != PickUpItem.ItemType.NONE) { downgrade(this.artifactType); } this.artifactType = artifactType; manaRegen *= 1.5f; new UIMessage("you have picked up the " + artifactType.ToString(), 4); if (artifactType == PickUpItem.ItemType.DAMAGE_ARTIFACT) { attackDamage *= 1.8f; attackEnvDamage *= 1.2f; attackRange *= 1.8f; // TODO extend effect! attackMana *= 0.8f; new UIMessage("damage and atack range doubled!", 3); } else if (artifactType == PickUpItem.ItemType.HEALER_ARTIFACT) { heal *= 1.8f; shieldMana *= 0.8f; initialShieldMana *= 1.2f; maxShieldHealth *= 1.8f; new UIMessage("heal speed and shield helth doubled!", 3); // TODO shield type/size! } else if (artifactType == PickUpItem.ItemType.TELEPATH_ARTIFACT) { telekenMana *= 0.8f; telekenRange *= 1.8f; new UIMessage("telekenesis range doubled!", 3); // TODO can hit humans and can teleken bigger blocks! } }
public override void upgrade(PickUpItem.ItemType artifactType) { if (artifactType != PickUpItem.ItemType.LESSER_ARTIFACT && artifactType != PickUpItem.ItemType.DAMAGE_ARTIFACT) { return; } hasArtifact = name == ATTACK_TYPE && artifactType == PickUpItem.ItemType.DAMAGE_ARTIFACT; float modifier = 1.5f; if (artifactType == PickUpItem.ItemType.LESSER_ARTIFACT) { modifier = 1.2f; } for (int i = 0; i < damageValues.Count; i++) { damageValues[i] *= modifier; } Debug.Log("Damage upgraded"); }
public abstract void upgrade(PickUpItem.ItemType artifactType);