src/com/lilithsthrone/game/character/body/Body.java
/** To be called after every transformation. Returns the body's race. */
To be called after every transformation. Returns the body's race.
To be called after every transformation . Returns the body ' s race .
public void calculateRace(GameCharacter target) {
		handleAllBodyPartsList();
		AbstractRace race = Race.HUMAN;
		if(this.getBodyMaterial()==BodyMaterial.SLIME) {
			race = Race.SLIME;
			this.raceStage = RaceStage.GREATER;
		} else if(target!=null && target.isElemental()) {
			race = Race.ELEMENTAL;
			this.raceStage = RaceStage.GREATER;
		} else {
			race = getRaceFromPartWeighting();
			this.raceStage = getRaceStageFromPartWeighting();
		}
		subspecies = AbstractSubspecies.getSubspeciesFromBody(this, race);
		halfDemonSubspecies = null; 
		if(subspecies.getSubspeciesOverridePriority()>0 && (this.getSubspeciesOverride()==null || subspecies.getSubspeciesOverridePriority()>=this.getSubspeciesOverride().getSubspeciesOverridePriority())) {
			this.setSubspeciesOverride(subspecies);
		}
if(overrideSubspecies) {
	this.setSubspeciesOverride(subspecies);
if(target!=null && target.getBody()!=null && Main.game.isStarted()) { // Apparently this is needed to stop Lyssieth from losing her status effect???
	target.addStatusEffect(StatusEffect.SUBSPECIES_BONUS, -1);
	}
public void calculateRace ( GameCharacter target ) { handleAllBodyPartsList ( ) ; AbstractRace race = Race . HUMAN ; if ( this . getBodyMaterial ( ) == BodyMaterial . SLIME ) { race = Race . SLIME ; this . raceStage = RaceStage . GREATER ; } else if ( target != null && target . isElemental ( ) ) { race = Race . ELEMENTAL ; this . raceStage = RaceStage . GREATER ; } else { race = getRaceFromPartWeighting ( ) ; this . raceStage = getRaceStageFromPartWeighting ( ) ; } subspecies = AbstractSubspecies . getSubspeciesFromBody ( this , race ) ; halfDemonSubspecies = null ; if ( subspecies . getSubspeciesOverridePriority ( ) > 0 && ( this . getSubspeciesOverride ( ) == null || subspecies . getSubspeciesOverridePriority ( ) >= this . getSubspeciesOverride ( ) . getSubspeciesOverridePriority ( ) ) ) { this . setSubspeciesOverride ( subspecies ) ; } }
To be called after every transformation.
To be called after every transformation .
// Every time race is calculated, it's because parts have changed, so reset the body parts list: //		if(target!=null) { //			target.removeStatusEffect(StatusEffect.SUBSPECIES_BONUS); //		} //		boolean overrideSubspecies = false; // reset so it will be recalculated when accessed //		switch(subspecies) { //			case IMP: //				overrideSubspecies = this.getSubspeciesOverride()!=Subspecies.IMP_ALPHA //						&& this.getSubspeciesOverride()!=Subspecies.HALF_DEMON //						&& this.getSubspeciesOverride()!=Subspecies.DEMON //						&& this.getSubspeciesOverride()!=Subspecies.LILIN //						&& this.getSubspeciesOverride()!=Subspecies.ELDER_LILIN; //				break; //			case IMP_ALPHA: //				overrideSubspecies = this.getSubspeciesOverride()!=Subspecies.HALF_DEMON //						&& this.getSubspeciesOverride()!=Subspecies.DEMON //						&& this.getSubspeciesOverride()!=Subspecies.LILIN //						&& this.getSubspeciesOverride()!=Subspecies.ELDER_LILIN; //				break; //			case HALF_DEMON: //				overrideSubspecies = this.getSubspeciesOverride()!=Subspecies.DEMON //						&& this.getSubspeciesOverride()!=Subspecies.LILIN //						&& this.getSubspeciesOverride()!=Subspecies.ELDER_LILIN; //				break; //			case DEMON: //				overrideSubspecies = this.getSubspeciesOverride()!=Subspecies.LILIN //						&& this.getSubspeciesOverride()!=Subspecies.ELDER_LILIN; //				break; //			case ELDER_LILIN: //			case LILIN: //				overrideSubspecies = true; //				break; //			default: //				break; //		} //		 //		if(overrideSubspecies) { //			this.setSubspeciesOverride(subspecies); //		} //		if(target!=null && target.getBody()!=null && Main.game.isStarted()) { // Apparently this is needed to stop Lyssieth from losing her status effect??? //			target.addStatusEffect(StatusEffect.SUBSPECIES_BONUS, -1); //		}