public override bool Perform() { bool test = false; if (Attackee is IStatBeing) { IStatBeing statBeing = Attackee as IStatBeing; int strength = Math.Max(statBeing.Stats["St"].Value, MAX_STRENGTH); if (Rng.Random.NextFloat() > MAX_STRENGTH / (float)REFERENCE_STRENGTH) { test = true; } } else { if (Rng.Random.NextFloat() > TEST_THRESHOLD) { test = true; } } if (test) { Position pos = performer.Position; performer.Position = UtopiecAi.GetOppositePosition(performer, Attackee); Attackee.Position = pos; notify("pull-in-water", Attackee); } else { } return(true); }
private bool dxCheck() { if (Attackee is IStatBeing) { IStatBeing statBeing = Attackee as IStatBeing; Stat dx = statBeing.Stats["Dx"]; if (dx != null) { int dxValue = dx.Value; if (Rng.Random.Next(VhPc.MAX_STAT_VALUE) < dxValue) { return(true); } } } return(false); }
private bool stCheck() { if (Performer is IStatBeing) { IStatBeing statBeing = Performer as IStatBeing; Stat st = statBeing.Stats["St"]; if (st != null) { int stValue = st.Value / 2; if (Rng.Random.Next(VhPc.MAX_STAT_VALUE) < stValue) { return(true); } } } return(false); }