[Reserved] Netease Wars geeks Official Guide - their bones game developers 1-

Level connection: https://codecombat.163.com/play/level/them-bones

Free Trial: https://codecombat.163.com/play

Okar generator generates enemies over time.

Brief introduction

"Generator" is generated from time to time enemy of the generator.

"Builder" is generated by default is strange skull `" skeleton ", one kind of powerful enemies, whether human or ogre will attack!

However, "the strange skull" fear luminous stone "lightstone".

If players get the "light stone", the strange skull will stay away from the player, which is able to destroy the "Generator" to secure enough time.

The default code

# Builder will generate enemies over time.
# Strange skull afraid luminous stone.
player = game.spawnPlayerXY("champion", 15, 35)
player.attackDamage = 60
player.maxSpeed = 8
game.addSurviveGoal()
game.addDefeatGoal()
game.spawnXY("x-mark-stone", 60, 35)
# Generate a "generator"
# Generate a "glow stone"
# Now, clearance your game!

Overview

Generator "attribute is set.

generator = game.spawnXY("generator", 20, 20)
generator.spawnType = "skeleton"
generator.spawnDelay = 5

generator.spawnType is a string that represents the type of the enemy to be generated.

generator.spawnDelay is a number representing the delay between the generation time.

Their bones Solution

# Builder will generate enemies over time.
# Strange skull afraid luminous stone.
player = game.spawnPlayerXY("champion", 15, 35)
player.attackDamage = 60
player.maxSpeed = 8
game.addSurviveGoal()
game.addDefeatGoal()
# Generate a "generator"
game.spawnXY("generator", 45, 35)
# Generate a "glow stone"
game.spawnXY("lightstone", 25, 45);
# Now, clearance your game!
 

Raiders made in the official teaching Wars geeks column, the original address is:

https://codecombat.163.com/news/jikezhanji-tamengutou

Geek Wars - learn programming, with play!

Guess you like

Origin www.cnblogs.com/codecombat/p/12124041.html