Game
Táticas de monstros
10 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

Just as Pecaminosa's musicians #improvise this rendition of #LittleSunflower 🌻, so do we improvise with this post you're reading. 😂

What's coming out of your own improvs? 🤔

#Pecaminosa | #IndieDev | #OST | #Jazz

Heya! I wanted to show some gameplay progress i made so far. I hope you like it ^^

A Shiny Mega Gengar 🌟 For @ManutkArt 's #ThreeColorsChallenge!

We're glad to announce that Baby Dino Adventures 🦖 is now available in Early Access here on GameJolt! Link: https://gamejolt.com/games/babydinoadventures/508121 Walk, run, and jump as a baby t-rex in this cute platformer Free demo available #IndieGame | #GameDev | #PixelArt

If you have more of an acquired taste, the restaurants in Niravasi have you covered! Maybe skip the salad bar, though.

I mostly build 3D First Person Shooter game mechanics in Unity, and in this I'm just showing C4 mechanics I made for a little side project I am working on! :)

Our menu, gathered a huge feedback and positive comments among foreign audience, what you say? Game Steam: https://store.steampowered.com/app/1543090/LiBER/

Annie of the stars

Sonic and Shadow as Pokémons. #Fakemon

Hey you, rookie! Yes, I am talking to you!! Come over here? Relax! Just stick to me and everything will be fine. By the way, my name is James Varhuher, but you can call me Big J. I will bring you up to speed.