Ejemplo n.º 1
0
	public double raceSpeed(int aRound,int aJumps,ESurfaceType aSurface) {
	
		Debug.LogWarning("Jockey Speed Effector Not working!");
		if(SPEEDLEVELS[99]==0) {
			HorseDataBase.initLevels();
		}
		double baseSpeed = 0.75*((SPEEDLEVELS[GetLevelFromXP(this.speed)]/80));
		
		double jumpingMultiplier = 1.0;
		
		double jumpPref =  this.personalityJumper/2000;
		if(aJumps>0) {
			// Flat Racer = 100
			// Jumper  = 0
			jumpPref = (100 - this.personalityJumper)/2000;
		} else {
		
		}
		jumpPref += 1;
		
		double bigRacerSpeed = this.horseTalents.bigRacer*aRound / 20;
		baseSpeed += bigRacerSpeed;
		// Surface 0 = Green
		// Surface 1 = Mud 
		// Surface 2 = Sand
		
		
		if(this.surfacePreference==aSurface) {
			baseSpeed *= 1.10;
		} else {
			baseSpeed *= 1+(0.03*this.horseTalents.allTerrain);		
		}

		if(cachedRandomize==0) {
			cachedRandomize = Random.Range(0f,1f);
			cachedRandomize2 = Random.Range(0f,1f);
		}
		float randomnessMultiplier = (100-this.personalityProfessional)/100;
		float randomness = (float) cachedRandomize/10;
		float unpredictableSpeedChangePercent = (float) ((randomness-0.05)*randomnessMultiplier);
		float speedTalent = (horseTalents.superSpeed/5);
		
		 
		float bigRacer = (this.personalityBigRacer*aRound)/400;
		float flatTrack = 0f;
		if(aRound==0||aRound==1) {
			flatTrack = (100-this.personalityBigRacer)/80;
		} else {
		
		}

		return (float) (baseSpeed+speedTalent+flatTrack+bigRacer)*(1+unpredictableSpeedChangePercent)*jumpPref;
	}
Ejemplo n.º 2
0
	public double middleMaxSpeed(int aRound,int aJumps,ESurfaceType aSurface) {
		this.cachedMidSpeed = (float) raceSpeed(aRound,aJumps,aSurface)*middleThirdEffector;
		return cachedMidSpeed;
	}
Ejemplo n.º 3
0
	public double endMaxSpeed(int aRound,int aJumps,ESurfaceType aSurface) {
		this.cachedEndSpeed =(float) raceSpeed(aRound,aJumps,aSurface)*finalThirdEffector;
		return cachedEndSpeed; 
	}
Ejemplo n.º 4
0
	public double startMaxSpeed(int aRound,int aJumps,ESurfaceType aSurface) {
		this.cachedStartSpeed = (float) raceSpeed(aRound,aJumps,aSurface)*firstThirdEffector;
		return cachedStartSpeed;
	}