function canAttack(){ if ( this.level.isPeaceful == true ) { return false; // level is peaceful } return true; // can attack :)}