mirror of
https://gitee.com/freeyz/godot-mota.git
synced 2024-12-22 14:49:21 +08:00
完成怪物伤害计算逻辑,完成1F和2F场景搭建
This commit is contained in:
parent
19b9823ecb
commit
bdf2a65152
BIN
assets/images/skill/skill (1).png
Normal file
BIN
assets/images/skill/skill (1).png
Normal file
Binary file not shown.
After Width: | Height: | Size: 119 KiB |
34
assets/images/skill/skill (1).png.import
Normal file
34
assets/images/skill/skill (1).png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/skill (1).png-c49096ed3d0e1ec3ea5b13ce7f659d53.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/images/skill/skill (1).png"
|
||||
dest_files=[ "res://.import/skill (1).png-c49096ed3d0e1ec3ea5b13ce7f659d53.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
BIN
assets/images/skill/skill (2).png
Normal file
BIN
assets/images/skill/skill (2).png
Normal file
Binary file not shown.
After Width: | Height: | Size: 70 KiB |
34
assets/images/skill/skill (2).png.import
Normal file
34
assets/images/skill/skill (2).png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/skill (2).png-5761404875feb7e5b663c2c765398fdd.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/images/skill/skill (2).png"
|
||||
dest_files=[ "res://.import/skill (2).png-5761404875feb7e5b663c2c765398fdd.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
BIN
assets/images/skill/skill (3).png
Normal file
BIN
assets/images/skill/skill (3).png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.3 KiB |
34
assets/images/skill/skill (3).png.import
Normal file
34
assets/images/skill/skill (3).png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/skill (3).png-c1e0b25522b827a7b23166b9ccf75ff2.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/images/skill/skill (3).png"
|
||||
dest_files=[ "res://.import/skill (3).png-c1e0b25522b827a7b23166b9ccf75ff2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
BIN
assets/images/skill/skill (4).png
Normal file
BIN
assets/images/skill/skill (4).png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
34
assets/images/skill/skill (4).png.import
Normal file
34
assets/images/skill/skill (4).png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/skill (4).png-fdfab06a1bb49e5702f6d444eaba0aae.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/images/skill/skill (4).png"
|
||||
dest_files=[ "res://.import/skill (4).png-fdfab06a1bb49e5702f6d444eaba0aae.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
BIN
assets/images/skill/skill (5).png
Normal file
BIN
assets/images/skill/skill (5).png
Normal file
Binary file not shown.
After Width: | Height: | Size: 156 KiB |
34
assets/images/skill/skill (5).png.import
Normal file
34
assets/images/skill/skill (5).png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/skill (5).png-66a8a6bdf941747e46473dee93d5745c.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/images/skill/skill (5).png"
|
||||
dest_files=[ "res://.import/skill (5).png-66a8a6bdf941747e46473dee93d5745c.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
BIN
assets/images/skill/skill (6).png
Normal file
BIN
assets/images/skill/skill (6).png
Normal file
Binary file not shown.
After Width: | Height: | Size: 178 KiB |
34
assets/images/skill/skill (6).png.import
Normal file
34
assets/images/skill/skill (6).png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/skill (6).png-5b00d6426f129230b0f46a764af3429e.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/images/skill/skill (6).png"
|
||||
dest_files=[ "res://.import/skill (6).png-5b00d6426f129230b0f46a764af3429e.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
@ -88,6 +88,7 @@ config/icon="res://settings/icon.png"
|
||||
|
||||
FileUtils="*res://src/utils/FileUtils.gd"
|
||||
Messages="*res://src/hud/Messages.gd"
|
||||
MonsterBook="*res://src/monster/MonsterBook.gd"
|
||||
|
||||
[debug]
|
||||
|
||||
@ -105,6 +106,29 @@ window/dpi/allow_hidpi=true
|
||||
window/stretch/mode="viewport"
|
||||
window/stretch/aspect="keep"
|
||||
|
||||
[importer_defaults]
|
||||
|
||||
texture={
|
||||
"compress/bptc_ldr": 0,
|
||||
"compress/hdr_mode": 0,
|
||||
"compress/lossy_quality": 0.7,
|
||||
"compress/mode": 0,
|
||||
"compress/normal_map": 0,
|
||||
"detect_3d": false,
|
||||
"flags/anisotropic": false,
|
||||
"flags/filter": false,
|
||||
"flags/mipmaps": false,
|
||||
"flags/repeat": 0,
|
||||
"flags/srgb": 2,
|
||||
"process/HDR_as_SRGB": false,
|
||||
"process/fix_alpha_border": true,
|
||||
"process/invert_color": false,
|
||||
"process/premult_alpha": false,
|
||||
"size_limit": 0,
|
||||
"stream": false,
|
||||
"svg/scale": 1.0
|
||||
}
|
||||
|
||||
[rendering]
|
||||
|
||||
quality/driver/driver_name="GLES2"
|
||||
|
@ -1,10 +1,17 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
[gd_scene load_steps=13 format=2]
|
||||
|
||||
[ext_resource path="res://src/player/Player.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://src/level/LevelInstance.gd" type="Script" id=2]
|
||||
[ext_resource path="res://src/stairs/StairsUp.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://src/navigation/NavigationTileMap.gd" type="Script" id=4]
|
||||
[ext_resource path="res://src/navigation/NavigationTileset.tres" type="TileSet" id=5]
|
||||
[ext_resource path="res://src/monster/Monster.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://src/props/YellowKey.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://src/door/YellowDoor.tscn" type="PackedScene" id=8]
|
||||
[ext_resource path="res://src/props/RedGemstone.tscn" type="PackedScene" id=9]
|
||||
[ext_resource path="res://src/props/RedDrug.tscn" type="PackedScene" id=10]
|
||||
[ext_resource path="res://src/props/BlueGemstone.tscn" type="PackedScene" id=11]
|
||||
[ext_resource path="res://src/props/BlueDrug.tscn" type="PackedScene" id=12]
|
||||
|
||||
[node name="Level1" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
@ -26,8 +33,106 @@ changed_cells = {
|
||||
|
||||
[node name="Items" type="Node2D" parent="."]
|
||||
|
||||
[node name="YellowDoor" parent="Items" instance=ExtResource( 8 )]
|
||||
position = Vector2( 208, 400 )
|
||||
|
||||
[node name="YellowDoor2" parent="Items" instance=ExtResource( 8 )]
|
||||
position = Vector2( 336, 400 )
|
||||
|
||||
[node name="YellowDoor3" parent="Items" instance=ExtResource( 8 )]
|
||||
position = Vector2( 80, 368 )
|
||||
|
||||
[node name="YellowDoor4" parent="Items" instance=ExtResource( 8 )]
|
||||
position = Vector2( 82.1, 272 )
|
||||
|
||||
[node name="YellowDoor5" parent="Items" instance=ExtResource( 8 )]
|
||||
position = Vector2( 144, 208 )
|
||||
|
||||
[node name="YellowDoor6" parent="Items" instance=ExtResource( 8 )]
|
||||
position = Vector2( 208, 304 )
|
||||
|
||||
[node name="RedGemstone" parent="Items" instance=ExtResource( 9 )]
|
||||
position = Vector2( 240, 240 )
|
||||
|
||||
[node name="PlayerProps4" parent="Items" instance=ExtResource( 10 )]
|
||||
position = Vector2( 272, 240 )
|
||||
|
||||
[node name="PlayerProps8" parent="Items" instance=ExtResource( 12 )]
|
||||
position = Vector2( 336, 464 )
|
||||
|
||||
[node name="PlayerProps5" parent="Items" instance=ExtResource( 10 )]
|
||||
position = Vector2( 48, 208 )
|
||||
|
||||
[node name="PlayerProps6" parent="Items" instance=ExtResource( 10 )]
|
||||
position = Vector2( 48, 432 )
|
||||
|
||||
[node name="PlayerProps7" parent="Items" instance=ExtResource( 10 )]
|
||||
position = Vector2( 48, 464 )
|
||||
|
||||
[node name="YellowDoor7" parent="Items" instance=ExtResource( 8 )]
|
||||
position = Vector2( 304, 272 )
|
||||
|
||||
[node name="YellowKey" parent="Items" instance=ExtResource( 7 )]
|
||||
position = Vector2( 173.9, 432 )
|
||||
|
||||
[node name="YellowKey2" parent="Items" instance=ExtResource( 7 )]
|
||||
position = Vector2( 50.1, 304 )
|
||||
|
||||
[node name="YellowKey5" parent="Items" instance=ExtResource( 7 )]
|
||||
position = Vector2( 272, 208 )
|
||||
|
||||
[node name="YellowKey3" parent="Items" instance=ExtResource( 7 )]
|
||||
position = Vector2( 112, 464 )
|
||||
|
||||
[node name="YellowKey4" parent="Items" instance=ExtResource( 7 )]
|
||||
position = Vector2( 114.1, 432 )
|
||||
|
||||
[node name="Monster" parent="Items" instance=ExtResource( 6 )]
|
||||
position = Vector2( 112, 144 )
|
||||
|
||||
[node name="Monster2" parent="Items" instance=ExtResource( 6 )]
|
||||
position = Vector2( 144, 144 )
|
||||
animation = "redSlime"
|
||||
|
||||
[node name="Monster4" parent="Items" instance=ExtResource( 6 )]
|
||||
position = Vector2( 336, 432 )
|
||||
animation = "bat"
|
||||
|
||||
[node name="Monster9" parent="Items" instance=ExtResource( 6 )]
|
||||
position = Vector2( 240, 304 )
|
||||
animation = "bat"
|
||||
|
||||
[node name="Monster10" parent="Items" instance=ExtResource( 6 )]
|
||||
position = Vector2( 272, 304 )
|
||||
animation = "bluePriest"
|
||||
|
||||
[node name="Monster11" parent="Items" instance=ExtResource( 6 )]
|
||||
position = Vector2( 304, 304 )
|
||||
animation = "bat"
|
||||
frame = 1
|
||||
|
||||
[node name="Monster7" parent="Items" instance=ExtResource( 6 )]
|
||||
position = Vector2( 80, 240 )
|
||||
animation = "skeleton"
|
||||
|
||||
[node name="Monster8" parent="Items" instance=ExtResource( 6 )]
|
||||
position = Vector2( 80, 336 )
|
||||
animation = "skeletonSoilder"
|
||||
|
||||
[node name="Monster5" parent="Items" instance=ExtResource( 6 )]
|
||||
position = Vector2( 306.1, 464 )
|
||||
|
||||
[node name="Monster6" parent="Items" instance=ExtResource( 6 )]
|
||||
position = Vector2( 368, 464 )
|
||||
|
||||
[node name="Monster3" parent="Items" instance=ExtResource( 6 )]
|
||||
position = Vector2( 176, 144 )
|
||||
|
||||
[node name="Stairs" parent="Items" instance=ExtResource( 3 )]
|
||||
position = Vector2( 48, 144 )
|
||||
|
||||
[node name="BlueGemstone" parent="Items" instance=ExtResource( 11 )]
|
||||
position = Vector2( 240, 208 )
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource( 1 )]
|
||||
position = Vector2( 207, 464 )
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=20 format=2]
|
||||
[gd_scene load_steps=21 format=2]
|
||||
|
||||
[ext_resource path="res://src/player/Player.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://src/level/LevelInstance.gd" type="Script" id=2]
|
||||
@ -13,6 +13,7 @@
|
||||
[ext_resource path="res://src/props/BlueDrug.tscn" type="PackedScene" id=11]
|
||||
[ext_resource path="res://assets/images/npcs.png" type="Texture" id=12]
|
||||
[ext_resource path="res://src/npc/HelpEscape.gd" type="Script" id=13]
|
||||
[ext_resource path="res://src/monster/Monster.tscn" type="PackedScene" id=14]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 16, 16 )
|
||||
@ -186,6 +187,14 @@ position = Vector2( 144, 432 )
|
||||
[node name="Stairs2" parent="Items" instance=ExtResource( 10 )]
|
||||
position = Vector2( 48, 464 )
|
||||
|
||||
[node name="MonsterSprite" parent="Items" instance=ExtResource( 14 )]
|
||||
position = Vector2( 208, 176 )
|
||||
animation = "blueGuard"
|
||||
|
||||
[node name="MonsterSprite2" parent="Items" instance=ExtResource( 14 )]
|
||||
position = Vector2( 272, 176 )
|
||||
animation = "blueGuard"
|
||||
|
||||
[node name="Thief" type="StaticBody2D" parent="."]
|
||||
position = Vector2( 112, 336 )
|
||||
script = ExtResource( 13 )
|
||||
|
35
src/monster/Monster.gd
Normal file
35
src/monster/Monster.gd
Normal file
@ -0,0 +1,35 @@
|
||||
tool
|
||||
extends StaticBody2D
|
||||
|
||||
# 怪物信息
|
||||
var monster_info : Dictionary
|
||||
|
||||
var monster_sprite : AnimatedSprite
|
||||
|
||||
func _ready():
|
||||
monster_sprite = get_parent()
|
||||
monster_info = MonsterBook.get_info_by_name(monster_sprite.animation)
|
||||
|
||||
# 玩家触碰回调
|
||||
func on_player_touched(player):
|
||||
player.stop()
|
||||
var hurt = get_hurt(player)
|
||||
if hurt > player.hp:
|
||||
Messages.showDialog("你无法打败此怪物")
|
||||
player.resume()
|
||||
return
|
||||
#播放动画
|
||||
var skill_sprite : AnimatedSprite = $SkillSprite
|
||||
skill_sprite.visible = true
|
||||
skill_sprite.playing = true
|
||||
yield(skill_sprite,"animation_finished")
|
||||
#减扣英雄血量
|
||||
player.hp -= hurt
|
||||
#删除怪物
|
||||
monster_sprite.queue_free()
|
||||
player.resume()
|
||||
|
||||
# 计算伤害
|
||||
func get_hurt(player) -> int:
|
||||
var count = (self.monster_info.hp / (player.atk - monster_info.def)) as int
|
||||
return count * (monster_info.atk - player.def)
|
38
src/monster/Monster.tscn
Normal file
38
src/monster/Monster.tscn
Normal file
@ -0,0 +1,38 @@
|
||||
[gd_scene load_steps=11 format=2]
|
||||
|
||||
[ext_resource path="res://assets/images/skill/skill (2).png" type="Texture" id=1]
|
||||
[ext_resource path="res://assets/images/skill/skill (5).png" type="Texture" id=2]
|
||||
[ext_resource path="res://assets/images/skill/skill (3).png" type="Texture" id=3]
|
||||
[ext_resource path="res://assets/images/skill/skill (4).png" type="Texture" id=4]
|
||||
[ext_resource path="res://assets/images/skill/skill (1).png" type="Texture" id=5]
|
||||
[ext_resource path="res://assets/images/skill/skill (6).png" type="Texture" id=6]
|
||||
[ext_resource path="res://src/monster/Monster.gd" type="Script" id=7]
|
||||
[ext_resource path="res://src/monster/monster_spriteframes.tres" type="SpriteFrames" id=8]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 16, 16 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=2]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 5 ), ExtResource( 1 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 2 ), ExtResource( 6 ) ],
|
||||
"loop": false,
|
||||
"name": "default",
|
||||
"speed": 12.0
|
||||
} ]
|
||||
|
||||
[node name="MonsterSprite" type="AnimatedSprite"]
|
||||
frames = ExtResource( 8 )
|
||||
animation = "greenSlime"
|
||||
frame = 1
|
||||
playing = true
|
||||
|
||||
[node name="Monster" type="StaticBody2D" parent="."]
|
||||
script = ExtResource( 7 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Monster"]
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="SkillSprite" type="AnimatedSprite" parent="Monster"]
|
||||
visible = false
|
||||
scale = Vector2( 0.2, 0.2 )
|
||||
frames = SubResource( 2 )
|
24
src/monster/MonsterBook.gd
Normal file
24
src/monster/MonsterBook.gd
Normal file
@ -0,0 +1,24 @@
|
||||
extends Node
|
||||
|
||||
var monster_data : Dictionary
|
||||
|
||||
# 根据json文件初始化怪物数据
|
||||
func _ready():
|
||||
var file = File.new()
|
||||
file.open("res://src/monster/monster.json",File.READ)
|
||||
var json_result = JSON.parse(file.get_as_text())
|
||||
if json_result.error != OK:
|
||||
print(json_result.error_string)
|
||||
else:
|
||||
monster_data = json_result.result
|
||||
file.close()
|
||||
|
||||
# 获取所有怪物名称
|
||||
func get_monsters_name() -> Array:
|
||||
if monster_data == null:
|
||||
return []
|
||||
return monster_data.keys()
|
||||
|
||||
# 根据怪物名称获取怪物信息
|
||||
func get_info_by_name(name:String) -> Dictionary:
|
||||
return monster_data[name]
|
605
src/monster/monster.json
Normal file
605
src/monster/monster.json
Normal file
@ -0,0 +1,605 @@
|
||||
{
|
||||
"greenSlime": {
|
||||
"name": "绿色史莱姆",
|
||||
"hp": 35,
|
||||
"atk": 18,
|
||||
"def": 1,
|
||||
"money": 1,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"redSlime": {
|
||||
"name": "红色史莱姆",
|
||||
"hp": 45,
|
||||
"atk": 20,
|
||||
"def": 2,
|
||||
"money": 2,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"blackSlime": {
|
||||
"name": "大史莱姆",
|
||||
"hp": 130,
|
||||
"atk": 60,
|
||||
"def": 3,
|
||||
"money": 8,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"slimelord": {
|
||||
"name": "史莱姆王",
|
||||
"hp": 360,
|
||||
"atk": 310,
|
||||
"def": 20,
|
||||
"money": 40,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"bat": {
|
||||
"name": "小蝙蝠",
|
||||
"hp": 35,
|
||||
"atk": 38,
|
||||
"def": 3,
|
||||
"money": 3,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"bigBat": {
|
||||
"name": "大蝙蝠",
|
||||
"hp": 60,
|
||||
"atk": 100,
|
||||
"def": 8,
|
||||
"money": 12,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"redBat": {
|
||||
"name": "吸血蝙蝠",
|
||||
"hp": 200,
|
||||
"atk": 390,
|
||||
"def": 90,
|
||||
"money": 50,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"vampire": {
|
||||
"name": "吸血鬼",
|
||||
"hp": 444,
|
||||
"atk": 199,
|
||||
"def": 66,
|
||||
"money": 144,
|
||||
"experience": 0,
|
||||
"special": 0,
|
||||
"notBomb": true
|
||||
},
|
||||
"skeleton": {
|
||||
"name": "骷髅人",
|
||||
"hp": 50,
|
||||
"atk": 42,
|
||||
"def": 6,
|
||||
"money": 6,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"skeletonSoilder": {
|
||||
"name": "骷髅士兵",
|
||||
"hp": 55,
|
||||
"atk": 52,
|
||||
"def": 12,
|
||||
"money": 8,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"skeletonCaptain": {
|
||||
"name": "骷髅队长",
|
||||
"hp": 100,
|
||||
"atk": 65,
|
||||
"def": 15,
|
||||
"money": 30,
|
||||
"experience": 0,
|
||||
"special": 0,
|
||||
"notBomb": true
|
||||
},
|
||||
"ghostSkeleton": {
|
||||
"name": "鬼战士",
|
||||
"hp": 220,
|
||||
"atk": 180,
|
||||
"def": 30,
|
||||
"money": 35,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"zombie": {
|
||||
"name": "兽人",
|
||||
"hp": 260,
|
||||
"atk": 85,
|
||||
"def": 5,
|
||||
"money": 18,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"zombieKnight": {
|
||||
"name": "兽人武士",
|
||||
"hp": 320,
|
||||
"atk": 120,
|
||||
"def": 15,
|
||||
"money": 30,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"rock": {
|
||||
"name": "石头人",
|
||||
"hp": 20,
|
||||
"atk": 100,
|
||||
"def": 68,
|
||||
"money": 28,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"slimeMan": {
|
||||
"name": "幽灵",
|
||||
"hp": 320,
|
||||
"atk": 140,
|
||||
"def": 20,
|
||||
"money": 30,
|
||||
"experience": 0,
|
||||
"special": 0,
|
||||
"atkValue": null,
|
||||
"defValue": null
|
||||
},
|
||||
"bluePriest": {
|
||||
"name": "初级法师",
|
||||
"hp": 60,
|
||||
"atk": 32,
|
||||
"def": 8,
|
||||
"money": 5,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"redPriest": {
|
||||
"name": "高级法师",
|
||||
"hp": 100,
|
||||
"atk": 95,
|
||||
"def": 30,
|
||||
"money": 22,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"brownWizard": {
|
||||
"name": "初级巫师",
|
||||
"hp": 220,
|
||||
"atk": 370,
|
||||
"def": 110,
|
||||
"money": 80,
|
||||
"experience": 0,
|
||||
"special": 15,
|
||||
"value": 100,
|
||||
"range": 1
|
||||
},
|
||||
"redWizard": {
|
||||
"name": "高级巫师",
|
||||
"hp": 200,
|
||||
"atk": 380,
|
||||
"def": 130,
|
||||
"money": 90,
|
||||
"experience": 0,
|
||||
"special": 15,
|
||||
"value": 200,
|
||||
"zoneSquare": null,
|
||||
"range": 1
|
||||
},
|
||||
"yellowGuard": {
|
||||
"name": "初级卫兵",
|
||||
"hp": 50,
|
||||
"atk": 48,
|
||||
"def": 22,
|
||||
"money": 12,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"blueGuard": {
|
||||
"name": "中级卫兵",
|
||||
"hp": 100,
|
||||
"atk": 180,
|
||||
"def": 110,
|
||||
"money": 50,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"redGuard": {
|
||||
"name": "高级卫兵",
|
||||
"hp": 180,
|
||||
"atk": 460,
|
||||
"def": 360,
|
||||
"money": 200,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"swordsman": {
|
||||
"name": "双手剑士",
|
||||
"hp": 100,
|
||||
"atk": 680,
|
||||
"def": 50,
|
||||
"money": 55,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"soldier": {
|
||||
"name": "战士",
|
||||
"hp": 210,
|
||||
"atk": 200,
|
||||
"def": 65,
|
||||
"money": 45,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"yellowKnight": {
|
||||
"name": "骑士队长",
|
||||
"hp": 120,
|
||||
"atk": 150,
|
||||
"def": 50,
|
||||
"money": 100,
|
||||
"experience": 0,
|
||||
"special": 0,
|
||||
"notBomb": true
|
||||
},
|
||||
"redKnight": {
|
||||
"name": "骑士",
|
||||
"hp": 160,
|
||||
"atk": 230,
|
||||
"def": 105,
|
||||
"money": 65,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"darkKnight": {
|
||||
"name": "黑暗骑士",
|
||||
"hp": 180,
|
||||
"atk": 430,
|
||||
"def": 210,
|
||||
"money": 120,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"blackKing": {
|
||||
"name": "高级巫师",
|
||||
"hp": 200,
|
||||
"atk": 380,
|
||||
"def": 130,
|
||||
"money": 90,
|
||||
"experience": 0,
|
||||
"special": 18,
|
||||
"bomb": false,
|
||||
"value": 200
|
||||
},
|
||||
"yellowKing": {
|
||||
"name": "黄衣魔王",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"greenKing": {
|
||||
"name": "青衣武士",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"blueKnight": {
|
||||
"name": "蓝骑士",
|
||||
"hp": 100,
|
||||
"atk": 120,
|
||||
"def": 0,
|
||||
"money": 9,
|
||||
"experience": 0,
|
||||
"special": 8
|
||||
},
|
||||
"goldSlime": {
|
||||
"name": "黄头怪",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"poisonSkeleton": {
|
||||
"name": "紫骷髅",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"poisonBat": {
|
||||
"name": "紫蝙蝠",
|
||||
"hp": 100,
|
||||
"atk": 120,
|
||||
"def": 0,
|
||||
"money": 14,
|
||||
"experience": 0,
|
||||
"special": 13
|
||||
},
|
||||
"steelRock": {
|
||||
"name": "铁面人",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"skeletonPriest": {
|
||||
"name": "骷髅法师",
|
||||
"hp": 100,
|
||||
"atk": 100,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 18,
|
||||
"value": 20
|
||||
},
|
||||
"skeletonKing": {
|
||||
"name": "骷髅王",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"skeletonWizard": {
|
||||
"name": "骷髅巫师",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"redSkeletonCaption": {
|
||||
"name": "骷髅武士",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"badHero": {
|
||||
"name": "迷失勇者",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"demon": {
|
||||
"name": "魔神武士",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"demonPriest": {
|
||||
"name": "魔神法师",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"goldHornSlime": {
|
||||
"name": "金角怪",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"redKing": {
|
||||
"name": "魔王",
|
||||
"hp": 8000,
|
||||
"atk": 5000,
|
||||
"def": 1000,
|
||||
"money": 500,
|
||||
"experience": 0,
|
||||
"special": 0,
|
||||
"notBomb": true
|
||||
},
|
||||
"whiteKing": {
|
||||
"name": "魔法警卫",
|
||||
"hp": 230,
|
||||
"atk": 450,
|
||||
"def": 100,
|
||||
"money": 100,
|
||||
"experience": 0,
|
||||
"special": 16
|
||||
},
|
||||
"blackMagician": {
|
||||
"name": "大法师",
|
||||
"hp": 4500,
|
||||
"atk": 560,
|
||||
"def": 310,
|
||||
"money": 1000,
|
||||
"experience": 0,
|
||||
"special": 0,
|
||||
"notBomb": true
|
||||
},
|
||||
"silverSlime": {
|
||||
"name": "银头怪",
|
||||
"hp": 100,
|
||||
"atk": 120,
|
||||
"def": 0,
|
||||
"money": 15,
|
||||
"experience": 0,
|
||||
"special": 14
|
||||
},
|
||||
"swordEmperor": {
|
||||
"name": "魔王",
|
||||
"hp": 5000,
|
||||
"atk": 1580,
|
||||
"def": 190,
|
||||
"money": 500,
|
||||
"experience": 0,
|
||||
"special": 0,
|
||||
"notBomb": true
|
||||
},
|
||||
"whiteHornSlime": {
|
||||
"name": "尖角怪",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"badPrincess": {
|
||||
"name": "痛苦魔女",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"badFairy": {
|
||||
"name": "黑暗仙子",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"grayPriest": {
|
||||
"name": "中级法师",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"redSwordsman": {
|
||||
"name": "剑王",
|
||||
"hp": 100,
|
||||
"atk": 120,
|
||||
"def": 0,
|
||||
"money": 7,
|
||||
"experience": 0,
|
||||
"special": 6,
|
||||
"n": 8
|
||||
},
|
||||
"whiteGhost": {
|
||||
"name": "水银战士",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"poisonZombie": {
|
||||
"name": "绿兽人",
|
||||
"hp": 100,
|
||||
"atk": 120,
|
||||
"def": 0,
|
||||
"money": 13,
|
||||
"experience": 0,
|
||||
"special": 12
|
||||
},
|
||||
"magicDragon": {
|
||||
"name": "魔龙",
|
||||
"hp": 1500,
|
||||
"atk": 600,
|
||||
"def": 250,
|
||||
"money": 800,
|
||||
"experience": 0,
|
||||
"special": 0,
|
||||
"notBomb": true
|
||||
},
|
||||
"octopus": {
|
||||
"name": "大乌贼",
|
||||
"hp": 1200,
|
||||
"atk": 180,
|
||||
"def": 20,
|
||||
"money": 100,
|
||||
"experience": 0,
|
||||
"special": 0,
|
||||
"notBomb": true
|
||||
},
|
||||
"darkFairy": {
|
||||
"name": "仙子",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"greenKnight": {
|
||||
"name": "强盾骑士",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"special": 0
|
||||
},
|
||||
"angel": {
|
||||
"name": "天使",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"point": 0,
|
||||
"special": 0
|
||||
},
|
||||
"elemental": {
|
||||
"name": "元素生物",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"point": 0,
|
||||
"special": 0
|
||||
},
|
||||
"steelGuard": {
|
||||
"name": "铁守卫",
|
||||
"hp": 0,
|
||||
"atk": 0,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"point": 0,
|
||||
"special": 18,
|
||||
"value": 20
|
||||
},
|
||||
"evilBat": {
|
||||
"name": "邪恶蝙蝠",
|
||||
"hp": 1000,
|
||||
"atk": 1,
|
||||
"def": 0,
|
||||
"money": 0,
|
||||
"experience": 0,
|
||||
"point": 0,
|
||||
"special": [
|
||||
2,
|
||||
3
|
||||
]
|
||||
}
|
||||
}
|
111
src/monster/monster_spriteframes.tres
Normal file
111
src/monster/monster_spriteframes.tres
Normal file
@ -0,0 +1,111 @@
|
||||
[gd_resource type="SpriteFrames" load_steps=16 format=2]
|
||||
|
||||
[ext_resource path="res://assets/images/enemys.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=7]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 256, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=8]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 256, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=9]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 288, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=10]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 288, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 32, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 32, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 0, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=11]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 512, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=12]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 512, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=5]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 128, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=6]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 128, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=13]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 672, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=14]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 672, 32, 32 )
|
||||
|
||||
[resource]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 7 ), SubResource( 8 ) ],
|
||||
"loop": true,
|
||||
"name": "skeleton",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 9 ), SubResource( 10 ) ],
|
||||
"loop": true,
|
||||
"name": "skeletonSoilder",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ) ],
|
||||
"loop": true,
|
||||
"name": "redSlime",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 3 ), SubResource( 4 ) ],
|
||||
"loop": true,
|
||||
"name": "greenSlime",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 11 ), SubResource( 12 ) ],
|
||||
"loop": true,
|
||||
"name": "bluePriest",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 5 ), SubResource( 6 ) ],
|
||||
"loop": true,
|
||||
"name": "bat",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 13 ), SubResource( 14 ) ],
|
||||
"loop": true,
|
||||
"name": "blueGuard",
|
||||
"speed": 5.0
|
||||
} ]
|
Loading…
Reference in New Issue
Block a user