public void next() { if (phase == 0) { turn(); } else if (phase == 2) { end(); } }
public void act(Character c, Skill action, String choice) { if (c == p1) { p1act = action; } if (c == p2) { p2act = action; } action.choice = choice; if (p1act == null) { p1.act(this); } else if (p2act == null) { p2.act(this); } else if (p1act != null && p2act != null) { clear(); if (p1.human() || p2.human()) { Global.gui().clearText(); } p1act = checkWorship(p1, p2, p1act); p2act = checkWorship(p2, p1, p2act); if (Global.isDebugOn(DebugFlags.DEBUG_SCENE)) { System.out.println(p1.name() + " uses " + p1act.getLabel(this)); System.out.println(p2.name() + " uses " + p2act.getLabel(this)); } if (p1.pet != null && p2.pet != null) { petbattle(p1.pet, p2.pet); } else if (p1.pet != null) { p1.pet.act(this, p2); } else if (p2.pet != null) { p2.pet.act(this, p1); } useSkills(); this.write("<br>"); p1.eot(this, p2, p2act); p2.eot(this, p1, p1act); checkStamina(p1); checkStamina(p2); getStance().decay(this); getStance().checkOngoing(this); phase = 0; if (!(p1.human() || p2.human())) { timer++; turn(); } updateMessage(); } }