Game
Táticas de monstros
11 years ago

Actualização do dia


Jogo actualizado

  • Agora o ladrão já esta com as magias funcionais

Eis um trecho de código do ladrão por curiosidade:

English by google:

updated game

  • Now the thief already with the functional spells

Here is a thief snippet of curiosity:

if status [3] > 9 /// SE TIVER MP SUFECIENTE NESTE CASO MAIS DE 9

{

//

calculo = irandom(100)

switch (status [14])

{

		
			case 0:

final = 0

break    

case 10:

if calculo <= 10 {final = 1} else {final = 0}

break 

case 20:

if calculo <= 20 {final = 1} else {final = 0}

break

case 30:

if calculo <= 30 {final = 1} else {final = 0}

break  

case 40:

if calculo <= 40 {final = 1} else {final = 0}

break 

case 50:

if calculo <= 50 {final = 1} else {final = 0}

break

case 60:

if calculo <= 60 {final = 1} else {final = 0}

break

case 70:

if calculo <= 70 {final = 1} else {final = 0}

break

case 80:

if calculo <= 80 {final = 1} else {final = 0}

break

case 90:

if calculo <= 90 {final = 1} else {final = 0}

break

case 100:

final = 1

break  
		
	

}

}else {final = 0}

////////////////////////////////////////////////

////////////////////////////////////////////////

/// GOLPEAR (SE CUMPRIR OS REQUISITOS)

if global.morre_monstro = false && status [2] > 0 && final = 0

{

/////// 1 FASE CALCULOS DE DANO

var resultado = status [4] - global.defesa_temp_de_monstro

global.resultado_do_monstro_final = round (resultado)

if global.resultado_do_monstro_final < 1 {global.resultado_do_monstro_final = 1}

// ver a sorte

var testasorte = irandom_range(0,1000)

if testasorte <= status [9]

{

global.critico = true

dacritico = true

global.resultado_do_monstro_final = global.resultado_do_monstro_final * 2

} else

{

dacritico = false

}

///////FASE 2: SONS,EFEITOS,ANIMAÇÔES, ETC…

audio_play_sound(Faca_som,1,0)

//

with (global.monstro_id)

{

hp -= global.resultado_do_monstro_final

instance_create(x,y-15,Faca_animacao_obj)

image_blend = c_red

gatilho_de_monstro = true // ACTIVA ESTA VAR NO MONSTRO EM QUESTÃO PARA ELE FAZER MODIFICAÇÔES NELE PROPRIO

}

global.moedas += global.resultado_do_monstro_final * 3

instance_create(60,45,Draw_dinheiro_dinamico_ladrao_obj)

with (icone_de_moeda_obj){effect_create_above(ef_explosion, x, y, 0.5, c_yellow)}

// GANHA EXPERIÊNCIA DEPENDENDO DO MONSTRO, VAMOS VER QUE MONSTRO É:

switch (global.monstro)

{

		
			  case 1:

  esperiencia_temporaria += 1

  break;

  case 2:

  esperiencia_temporaria += 2

  break;

  case 3:

  esperiencia_temporaria += 3

  break;

  case 4:

  esperiencia_temporaria += 4

  break;
		
	

}

instance_create (global.monstro_id.x+40,110,Vida_que_heroi_tira)

image_xscale = 1.5

image_yscale = 1.5

escolhe_tempo_de_golpe = true // PARA VOLTAR A ESCOLHER O TEMPO ATÉ AO PROXIMO GOLPE, ESTÁ NO STEP DESTA INSTANCIA

global.teste = resultado

}

////////////////////////////////////////////////

////////////////////////////////////////////////

/// MAGIA (SE CUMPRIR OS REQUISITOS)

if global.morre_monstro = false && status [2] > 0 && final = 1

{

//VAMOS VER QUAL DAS DUAS MAGIAS DO LADRÃO É

escolhemagia = choose(1,2)

if escolhemagia = 1 // SE FOR A MAGIA 1 (DE CURAR)

{

audio_play_sound(Magia_de_defesa_som,1,0)

effect_create_above(ef_firework, x, y, 20, c_lime)

status [3] -= 10 // REDUZ O MP (CUSTO DE MAGIA)

status [2] += status [15]/100 * 25 // GANHA 25% DO TOTAL DE VIDA

}

if escolhemagia = 2 // SE FOR A MAGIA 2 (DE ROUBAR EXPERIENCIA)

{

audio_play_sound(Roubar_exp_som,1,0)

status [10] += status [11]/100 * 5 // ADICIONA 2% DE EXPERIENCIA

status [3] -= 10

effect_create_above(ef_smoke, x, y, 50, c_aqua)

// AGORA VAMOS VER QUE ESTÁ VIVO PARA DAR EXPERIENCIA TAMBÉM

seguranca = heroi_na_porta

if global.status_heroi_1_morto = false && seguranca != global.heroi_na_porta_id_1.heroi_na_porta

{

with (global.heroi_na_porta_id_1)

{

status [10] += status [11]/100 * 5 // ADICIONA 2% DE EXPERIENCIA

effect_create_above(ef_explosion, x, y, 50, c_purple)

}}

if global.status_heroi_2_morto = false && seguranca != global.heroi_na_porta_id_2.heroi_na_porta

{

with (global.heroi_na_porta_id_2)

{

status [10] += status [11]/100 * 5 // ADICIONA 2% DE EXPERIENCIA

effect_create_above(ef_explosion, x, y, 50, c_purple)

}}

if global.status_heroi_3_morto = false && seguranca != global.heroi_na_porta_id_3.heroi_na_porta

{

with (global.heroi_na_porta_id_3)

{

status [10] += status [11]/100 * 5 // ADICIONA 2% DE EXPERIENCIA

effect_create_above(ef_explosion, x, y, 50, c_purple)

}}

if global.status_heroi_4_morto = false && seguranca != global.heroi_na_porta_id_4.heroi_na_porta

{

with (global.heroi_na_porta_id_4)

{

status [10] += status [11]/100 * 5 // ADICIONA 2% DE EXPERIENCIA

effect_create_above(ef_explosion, x, y, 50, c_purple)

}}

if global.status_heroi_5_morto = false && seguranca != global.heroi_na_porta_id_5.heroi_na_porta

{

with (global.heroi_na_porta_id_5)

{

status [10] += status [11]/100 * 5 // ADICIONA 2% DE EXPERIENCIA

effect_create_above(ef_explosion, x, y, 50, c_purple)

}}

if global.status_heroi_6_morto = false && seguranca != global.heroi_na_porta_id_6.heroi_na_porta

{

with (global.heroi_na_porta_id_6)

{

status [10] += status [11]/100 * 5 // ADICIONA 2% DE EXPERIENCIA

effect_create_above(ef_explosion, x, y, 50, c_purple)

}}

if global.status_heroi_7_morto = false && seguranca != global.heroi_na_porta_id_7.heroi_na_porta

{

with (global.heroi_na_porta_id_7)

{

status [10] += status [11]/100 * 5 // ADICIONA 2% DE EXPERIENCIA

effect_create_above(ef_explosion, x, y, 50, c_purple)

}}

if global.status_heroi_8_morto = false && seguranca != global.heroi_na_porta_id_8.heroi_na_porta

{

with (global.heroi_na_porta_id_8)

{

status [10] += status [11]/100 * 5 // ADICIONA 2% DE EXPERIENCIA

effect_create_above(ef_explosion, x, y, 50, c_purple)

}}

if global.status_heroi_9_morto = false && seguranca != global.heroi_na_porta_id_9.heroi_na_porta

{

with (global.heroi_na_porta_id_9)

{

status [10] += status [11]/100 * 5 // ADICIONA 2% DE EXPERIENCIA

effect_create_above(ef_explosion, x, y, 50, c_purple)

}}

}//

escolhe_tempo_de_golpe = true // PARA VOLTAR A ESCOLHER O TEMPO ATÉ AO PROXIMO GOLPE, ESTÁ NO STEP DESTA INSTANCIA

}

///



0 comments

Loading...

Next up

Fan art for Foolish I'm feeling kinda better so I drew this

Here's a peaceful little forest scene for this #screenshotsaturday, from the beginning of the game.

Successful landing

#screenshotsaturday

The whole squad is here!

Interested? Follow me!

Call it 'wrong turn'!🚫 The feeling of running into a house with only one exit🚪, and being doomed to die. #pixelart #pixelartist #pixelartwork #art #pixel #indiegame #IndieGameDev #indieartist

Spaaaace~

These are background sprites I've created for a game I'm working on at school ^w^ Click on the post to see how the sprites connect. You won't regret it! (personally, I think it's pretty heheh)

Drawn in Piskel using my mouse. Whaddya think?

Cash Banooca

Auto-chess meets Clash Royale in an intense strategic battle. Outsmart your opponent, hide your play and crush their armies! Empire Builder just got another major update, check it out! https://gamejolt.com/games/EmpireBuilder/558901

Coming Soon...