public override void applyFailure(int version, int rp, ELuck luck, EntityController user, List<PraeObject> targets) { // TODO: well - just remove 1/2 of the mana costs? if critical, remove full mana costs int minutes = 0; int MaPcost = (luck == ELuck.slipup) ? minutes * 3 : (minutes * 3) / 2; user.drainMana(MaPcost); }
public override void applySuccess(int version, int rp, ELuck luck, EntityController user, List<PraeObject> targets) { int IN = ((rp+1)/2 == rp/2) ? rp / 2 : (rp/2) + 1; // if rp is uneven, add +1 to rp/2 int LO = rp / 2; Debug.Assert(IN + LO == rp, PRE + "calculation error: IN+LO == rp invalidated!"); // TODO: animate object with these stats Debug.Assert(version == VER_SINGLE_TARGET, "verison bug?"); int minutes = UnityEngine.Random.Range(1,10) * Constants.gameTimeMultiplier; DateTime endtime = DateTime.Now.AddMinutes(minutes); InteractionComponent c = targets[0].AddInteractionComponent(); Constants.gameLogic.AddTimedInteraction(c, endtime); Debug.Log("Astrahlbelebung. Object will come to life for " + minutes + "minutes: " + targets[0]); // drain costs from user int MaPcost = minutes * 3; user.drainMana(MaPcost); }
public override void makeVisuals(int version, int rp, ELuck luck, EntityController user, List<PraeObject> targets) { throw new NotImplementedException(); }
public override void applySuccess(int version, int rp, ELuck luck, EntityController user, List<PraeObject> targets) { UnityEngine.MonoBehaviour.print("Test ability successfully used!"); }
public override void applyFailure(int version, int rp, ELuck luck, EntityController user, List<PraeObject> targets) { UnityEngine.MonoBehaviour.print("Test ability finally failed!"); }
/** * gets called from the TestManager after rolling some dice * rp are the remaining points of the test * @version: most abilities have different usage modes. Can be used as bitflag * @rp: the absolute difference between the required and the roled test value * @luck: normal, slipup or luck * @user: the one using this ability * @targets: any kind of object/entity that is effected by this ability */ public abstract void applySuccess(int version, int rp, ELuck luck, EntityController user, List<PraeObject> targets);
/** * func: handles all the visual effects in the game * @version: most abilities have different usage modes. Can be used as bitflag * @rp: the absolute difference between the required and the roled test value * @luck: normal, slipup or luck * @user: the one using this ability * @targets: any kind of object/entity that is effected by this ability */ public abstract void makeVisuals(int version, int rp, ELuck luck, EntityController user, List<PraeObject> targets);
public override void makeVisuals(int version, int rp, ELuck luck, EntityController user, List<PraeObject> targets) { }
public override void applySuccess(int version, int rp, ELuck luck, EntityController user, List<PraeObject> targets) { UnityEngine.MonoBehaviour.print("Ability not assigned"); Constants.chatManager.addLine("Ability not assigned"); }