* @param effect
	 * @return whether or the not the effect was successfully applied
	 */
	public boolean applyEffect(final Player player, final Effect effect) {
		final Client client = player.getClient();

		/*
		 * WARNING: healing effects currently remove any supplementary
		 * hitpoints. this should not remove hitpoints, it should only them up
		 * to the total hitpoints of a player. To account for this behavior, the
		 * totalhp could always be adjusted to be the current max, but then i'd
		 * have to track. If I don't do that any spells/effects that temporarily
		 * raise hitpoints will make healing you at all a bad thing
		 * NOTE: another problem arises, if I had 100 totalhp and 10 hp, then I could
		 * only heal myself to 90 (9/10 full heal).
		 */

		try {
			final String effectName = effect.getName();
			String temp;
			
			// remove effect if ! is prefixed to it
			if ( effectName.startsWith("!") ) {
				// covers dispel case for now -- will need serious work later
				if ( effectName.equals("!any") ) {
					// different dispels? -- rules?
					player.clearEffects();
					send("All Effects removed!", client);
				}
				else {
					temp = effectName.substring(effectName.indexOf("!") + 1, effectName.length());
					
					removeEffect(player, temp);
					
					//send(temp + " effect removed!", client);
				}
			}
			else {
				if ( effectName.startsWith("heal") ) {
					temp = effectName.substring(effectName.indexOf("+") + 1, effectName.length());

					try {
						Integer amount = Integer.parseInt(temp);
						
						debug("Amount of Healing: " + amount);
						debug("Hitpoints: " + player.getHP());
						debug("Hitpoints (total): " + player.getTotalHP());

						// if max is 10 and have 10, then no healing
						int diff = player.getTotalHP() - player.getHP();

						if (diff >= amount) {
							player.setHP(amount);
							
							send("Healing (+" + amount + ") effect applied!\nYou gained " + amount + " hit points.", client);
						}
						else if (diff < amount) {
							player.setHP(diff);
							
							send("Healing " + "(+" + amount + ") effect applied!\nYou gained " + diff + " hit points.", client);
						}

						/*
						 * else if (diff == amount) { player.setHP(amount);
						 * send("Healing (+" + amount +
						 * ") effect applied!\nYou gained " + amount +
						 * " hit points.", client); }
						 */
					}
					catch (NumberFormatException nfe) {
						// TODO is this debug message adequate?
						debug(nfe.getMessage()); // send a debug message
						System.out.println("--- Stack Trace ---");
						nfe.printStackTrace();
					}
				}
				else if ( effectName.startsWith("dam") ) {
					temp = effectName.substring(effectName.indexOf("-") + 1, effectName.length());

					try {
						Integer damage = Integer.parseInt(temp);
						
						debug("Amount of Damage: " + damage);
						debug("Hitpoints: " + player.getHP());
						debug("Hitpoints (total): " + player.getTotalHP());

						player.setHP(damage);

						send("Damage " + "(-" + damage + ") effect applied!\nYou lost " + damage + " hit points.", client);
					}
					catch (NumberFormatException nfe) {
						// TODO is this debug message adequate?
						debug(nfe.getMessage()); // send a debug message
						System.out.println("--- Stack Trace ---");
						nfe.printStackTrace();
					}
				}
				else {
					// TODO should I be doing this somewhere else? stat bonuses ought to be ongoing effects, right?
					String test = "";
					
					// detect whether this is a positive or negative effect
					int plus = effectName.indexOf('+');
					int minus = effectName.indexOf('-');
					
					Integer boost = 0;
					
					if( plus != -1 ) {
						test = effectName.substring(0, plus);
						boost = Utils.toInt(effectName.substring(plus + 1), 0);
					}

					else if( minus != -1 ) {
						test = effectName.substring(0, minus);
						boost = Utils.toInt(effectName.substring(minus + 1), 0);
					}

					if (boost != 0) {
						/** TODO: resolve this for results with differing stats **/
						switch (test) {
						case "str":
							debug("Strength Bonus: " + boost);
							player.setAbilityMod(Abilities.STRENGTH, boost);
							send("Strength increased by " + boost + " to " + player.getAbility(Abilities.STRENGTH), client);
							break;
						case "con":
							debug("Constitution Bonus: " + boost);
							player.setAbilityMod(Abilities.CONSTITUTION, boost);
							send("Constitution increased by " + boost + " to " + player.getAbility(Abilities.CONSTITUTION), client);
							break;
						case "dex":
							debug("Dexterity Bonus: " + boost);
							player.setAbilityMod(Abilities.DEXTERITY, boost);
							send("Dexterity increased by " + boost + " to " + player.getAbility(Abilities.DEXTERITY), client);
							break;
						case "int":
							debug("Intelligence Bonus: " + boost);
							player.setAbilityMod(Abilities.INTELLIGENCE, boost);
							send("Intelligence increased by " + boost + " to " + player.getAbility(Abilities.INTELLIGENCE), client);
							break;
						case "cha":
							debug("Charisma Bonus: " + boost);
							player.setAbilityMod(Abilities.CHARISMA, boost);
							send("Charisma increased by " + boost + " to " + player.getAbility(Abilities.CHARISMA), client);
							break;
						case "wis":
							debug("Wisdom Bonus: " + boost);
							player.setAbilityMod(Abilities.WISDOM, boost);
							send("Wisdom increased by " + boost + " to " + player.getAbility(Abilities.WISDOM), client);
							break;
						default:
							break;
						}
					}
					// add effects
					else {
						// cancel out the effect if they already had it
						// TODO should effect objects carry a stack/nostack detail?
						if ( player.hasEffect(effectName) ) {
							removeEffect(player, effectName);
						}
						
						player.addEffect(effect);
						
						send(effectName + " Effect applied to " + player.getName(), client);
						debug("Game> " + "added " + effectName + " to " + player.getName() + ".");
					}
				}
			}

			player.updateCurrentState();

			return true;
		}
		catch (Exception e) {
			// TODO why are catching just any old exception here?
			System.out.println("--- Stack Trace ---");
			e.printStackTrace();
			return false;
		}
	}