示例#1
0
文件: Battle.c 项目: mla133/PebbGame
void ActivateCombatFullPotion(void)
{
	if(AttemptToUseFullPotion())
	{
		PopMenu();
		BattleUpdate();
	}
}
示例#2
0
文件: main.c 项目: rokn/Helsys3
void Update()
{
	AGE_CameraUpdate();
	CameraControl();	
	snprintf(buffer, sizeof(buffer), "FPS: %d", CURRENT_FPS);
	AGE_SpriteLoadFromText(&fpsSprite, buffer, fpsTextColor, gFont);
	BattleUpdate();
	HandleMainInput();
}
示例#3
0
文件: Battle.c 项目: mla133/PebbGame
void DamageCurrentMonster(uint8_t strength, uint16_t level, uint8_t defense, uint8_t baseMultiplier, uint16_t bonusMultiplier)
{
	uint16_t base = baseMultiplier * (2 + strength + 4*((strength * level)/8 + (strength * strength)/64 + (level * level)/64));
	uint16_t damageToDeal = ApplyDefense(base, defense);

	damageToDeal = damageToDeal * bonusMultiplier / 100;
	
	currentMonsterHealth -= damageToDeal;
	ShowMainWindowRow(0, currentMonster->name, UpdateMonsterHealthText());
	BattleUpdate();
}
示例#4
0
文件: Battle.c 项目: mla133/PebbGame
void AttemptToRun(void)
{
	int runCheck = Random(3);
			
	if(runCheck == 0 && currentFloor < 20) // if floor is >= 20 you are fighting the dragon
	{
		CloseBattleWindow();
		IncrementEscapes();
		return;
	}

	BattleUpdate();
}
示例#5
0
文件: Battle.c 项目: mla133/PebbGame
void KillMonster(void) {
	currentMonsterHealth = 0;
	ShowMainWindowRow(0, currentMonster->name, UpdateMonsterHealthText());
	BattleUpdate();
}