//CALAMITY public void Init(StatBit bit, HitMe target, Firearm firearm, EffectType type) { Prepare(bit, firearm, type); if (type == EffectType.Calamity) { my_lava = Peripheral.Instance.zoo.getObject("Wishes/calamity_lava", true).GetComponent <Lava>(); } else { my_lava = Peripheral.Instance.zoo.getObject("Wishes/foil_lava", true).GetComponent <Lava>(); } my_lava.auto_return = true; my_lava.my_firearm = firearm; my_lava.Init(type, bit.level, lava_stats, lava_timer, true, firearm); my_lava.SetLocation(target.transform, target.transform.position, lava_size, Quaternion.identity); my_lava.SetFactor(1); my_lava.transform.localPosition = Vector3.zero; Vector3 pos = my_lava.transform.position; pos.z = 3.75f; my_lava.transform.position = pos; my_lava.updateMyPosition = true; target.lavas.Add(my_lava); }
IEnumerator Fire() { List <Vector3> targets = my_line.getFractions(bullets); StringBuilder line_string = new StringBuilder(); yield return(new WaitForSeconds(initial_delay)); foreach (Vector3 target in targets) { Lava lava = Peripheral.Instance.zoo.getObject(attack_lava, false).GetComponent <Lava>(); lava.SetLocation(this.transform, target, lava_size, Quaternion.identity); lava.Init(EffectType.Frost, level, stats, lava_life, true, null); lava.gameObject.SetActive(true); lava.SetFactor(1); line_string.Append("|"); line_string.Append(target.x); line_string.Append("_"); line_string.Append(target.y); yield return(new WaitForSeconds(intra_bullet_delay)); } Tracker.Log(PlayerEvent.SpecialSkillUsed, true, customAttributes: new Dictionary <string, string>() { { "attribute_1", EffectType.AirAttack.ToString() }, { "attribute_2", line_string.ToString() } }, customMetrics: new Dictionary <string, double>() { { "metric_1", level } }); }
private void GenerateLava() { foreach (Line line in map.Lines.Where(l => l.Color == MapColor.Red && l.Closed)) { Lava lava = Instantiate(prefabs.lavaPrefab, levelContainer).GetComponent <Lava>(); lava.Init(line.Points); MakeLineRenderer(line, new Color(0.5f, 0.05f, 0, 0.65f), lava.transform); } }
void SetEverythingOnFire(float[] stats) /// DOT FINISHER { my_lava = Zoo.Instance.getObject(lava_name, false).GetComponent <Lava>(); //my_lava.SetLocation(this.transform, this.transform.position, stats[1], Quaternion.identity); StatBit[] lava_statbits = new StatBit[1]; lava_statbits[0] = new StatBit(EffectType.Fear, stats[0], 1, true); StatSum lava_stats = new StatSum(1, 0, lava_statbits, RuneType.Vexing); my_lava.SetLocation(my_hitme.transform, my_hitme.transform.position, stats[1], Quaternion.identity); my_lava.Init(EffectType.DOT, 2, lava_stats, duration, true, null); my_lava.gameObject.SetActive(true); }
void CauseMassPanic(float[] stats) { my_lava = Zoo.Instance.getObject(lava_name, false).GetComponent <Lava>(); StatBit[] lava_statbits = new StatBit[1]; lava_statbits[0] = new StatBit(EffectType.Fear, stats[0], 0, true); StatSum lava_stats = new StatSum(1, 0, lava_statbits, RuneType.Vexing); my_lava.SetLocation(my_ai.transform, my_ai.transform.position, stats[1], Quaternion.identity); my_lava.lifespan = stats[0]; //not ideal, level is whaaaat my_lava.Init(EffectType.Fear, 2, lava_stats, lifetime, true, null); my_lava.gameObject.SetActive(true); }
void Fire() { foreach (Cluster target in clusters) { Lava lava = Peripheral.Instance.zoo.getObject(attack_lava, false).GetComponent <Lava>(); lava.SetLocation(this.transform, start_from, range, Quaternion.identity); lava.Init(skill_effect_type, level, stats, lava_life, true, null); target.my_lava = lava; lava.gameObject.SetActive(true); target.startLava(); active_lavas.Add(lava); } }
public void MakeDiffuse(Vector3 pos) { // Debug.Log("Diffuse doing diffusion\n"); //force StatBit diffuse_statbit = stats.GetStatBit(EffectType.Diffuse); //StatSum lava_statsum_old = stats.cloneAndRemoveStat(EffectType.Diffuse); float[] stat_floats = diffuse_statbit.getStats(); StatSum lava_statsum = new StatSum(); lava_statsum.runetype = RuneType.Sensible; lava_statsum.stats = new StatBit[1]; StatBit lava_statbit = new StatBit(); lava_statbit.effect_type = EffectType.Force; lava_statbit.base_stat = stat_floats[5]; lava_statbit.rune_type = RuneType.Sensible; lava_statbit.dumb = true; lava_statbit.very_dumb = true; lava_statsum.stats[0] = lava_statbit; float range = stat_floats[0]; float lifespan = stat_floats[1]; float factor = stat_floats[2]; //this statbit is not dumb. Diffuse just diffuses whatever Vexing force the arrow has. //get your own lava since lavas live for much longer than arrows, arrows get reused much faster. //each arrow does not have its own lava lava = Zoo.Instance.getObject("Wishes/diffuse_lava", false).GetComponent <Lava>(); lava.SetLocation(null, pos, range, Quaternion.identity); lava.gameObject.SetActive(true); // Debug.Log("Diffuse lava lifetime " + lifespan + "\n"); lava.Init(EffectType.Diffuse, diffuse_statbit.level, lava_statsum, lifespan, true, arrow.myFirearm); lava.SetFactor(factor); arrow.MakeMeDie(false); }
IEnumerator Fire() { yield return(new WaitForSeconds(initial_delay)); Lava lava = Peripheral.Instance.zoo.getObject(attack_lava, false).GetComponent <Lava>(); lava.SetLocation(this.transform, mousePos, range, Quaternion.identity); lava.Init(effect_type, level, stats, lava_life, true, null); lava.gameObject.SetActive(true); Tracker.Log(PlayerEvent.SpecialSkillUsed, true, customAttributes: new Dictionary <string, string>() { { "attribute_1", effect_type.ToString() }, { "attribute_2", mousePos.x + "_" + mousePos.y } }, customMetrics: new Dictionary <string, double>() { { "metric_1", level } }); }
bool Fire(Vector3 target) { target.z = 0f; Lava lava = Peripheral.Instance.zoo.getObject(meteor_lava, false).GetComponent <Lava>(); Debug.Log("making a meteor lava " + meteor_lava + " @ " + target + " size " + lava_size + "\n"); lava.Init(EffectType.Meteor, level, stats, lava_life, true, my_firearm); lava.SetLocation(this.transform, target, lava_size, Quaternion.identity); lava.SetFactor(1f); lava.gameObject.SetActive(true); List <HitMe> targets = lava.GetVictims(); foreach (HitMe victim in targets) { float distance = Vector2.Distance(target, victim.transform.position); float force = 1f + 1 / distance; float mass = victim.my_rigidbody.mass; Vector3 direction = (victim.transform.position - target).normalized; //Debug.Log("FROM " + target + ); victim.my_rigidbody.AddForce(15f * force * mass * direction, ForceMode2D.Impulse); victim.my_ai.Stunned = true; } Tracker.Log(PlayerEvent.SpecialSkillUsed, true, customAttributes: new Dictionary <string, string>() { { "attribute_1", EffectType.Meteor.ToString() }, { "attribute_2", target.x + "_" + target.y } }, customMetrics: new Dictionary <string, double>() { { "metric_1", level } }); return(true); }