本帖最后由 cyk070428 于 2020-3-18 10:26 编辑
$enemy_hp = 1 $fight_over = 1 $fight_time = 1 #防止触发一些奇♂奇♂gay♂gay的东西 class Fight < Sprite def fight_1 if $switches101 = 1 $actor_hp = 20 #角色HP初始化 ############################################################################### #此处补充内容:根据角色设置伤害,并将其代人 $actor_atk = 1 ############################################################################### $actor_x = 20 #横轴(20*2=40→ $actor_y = 25 #数轴(15*2=30↓ $actor_x_ = 320 $actor_y_ = 400 #角色位置初始化(上为判定,下为显示 $atk_time = 0 #攻击冷却初始化 $fight_time = 20 #回合剩余时间初始化 $zd_1_x = 0 $zd_1_y = 0 $zd_2_x = 0 $zd_2_y = 0 $zd_3_x = 0 $zd_3_y = 0 $zd_4_x = 0 $zd_4_y = 0 $zd_5_x = 0 $zd_5_y = 0 $zd_6_x = 0 $zd_6_y = 0 $zd_7_x = 0 $zd_7_y = 0 $zd_8_x = 0 $zd_8_y = 0 $zd_9_x = 0 $zd_9_y = 0 $zd_10_x = 0 $zd_10_y = 0 $zd_11_x = 0 $zd_11_y = 0 $zd_12_x = 0 $zd_12_y = 0 $zd_13_x = 0 $zd_13_y = 0 $zd_14_x = 0 $zd_14_y = 0 $zd_15_x = 0 $zd_15_y = 0 $zd_16_x = 0 $zd_16_y = 0 $zd_17_x = 0 $zd_17_y = 0 $zd_18_x = 0 $zd_18_y = 0 $zd_19_x = 0 $zd_19_y = 0 $zd_20_x = 0 $zd_20_y = 0 $zd_21_x = 0 $zd_21_y = 0 #编号为1-21的子弹的位置初始化 $atk_time = 0 #攻击冷却初始化 $fight_time = 20 #回合剩余时间初始化 $fight_over = 5 #剩余回合初始化 $enemy_hp = 40 #敌人HP初始化 ############################################################################### #此处补充内容:根据战斗场次设置伤害,并将其代人 $enemy_atk = 1 ############################################################################### end end def fight_2 if $zd_1_x = $actor_x if $zd_1_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_2_x = $actor_x if $zd_2_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_3_x = $actor_x if $zd_3_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_4_x = $actor_x if $zd_4_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_5_x = $actor_x if $zd_5_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_6_x = $actor_x if $zd_6_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_7_x = $actor_x if $zd_7_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_8_x = $actor_x if $zd_8_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_9_x = $actor_x if $zd_9_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_10_x = $actor_x if $zd_10_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_11_x = $actor_x if $zd_11_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_12_x = $actor_x if $zd_12_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_13_x = $actor_x if $zd_13_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_14_x = $actor_x if $zd_14_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_15_x = $actor_x if $zd_15_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_16_x = $actor_x if $zd_16_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_17_x = $actor_x if $zd_17_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_18_x = $actor_x if $zd_18_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_19_x = $actor_x if $zd_19_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_20_x = $actor_x if $zd_20_y = $actor_y $actor_hp -= $enemy_atk end end if $zd_21_x = $actor_x if $zd_21_y = $actor_y $actor_hp -= $enemy_atk end end end #显示移动自机 def fight_3 # 显示图片 myplane = Sprite.new myplane.bitmap = RPG::Cache.picture("myplane") myplane.ox = myplane.bitmap.width / 2 myplane.oy = myplane.bitmap.height / 2 myplane.x = $actor_x_ myplane.y = $actor_y_ end def fight_4 #删除 myplane.dispose end end alex = Fight.new alex.fight_1 #Fight攻击系统、移动脚本在Game_Player中(关键词:ukyjthdgfs/mfejnhwn) #disillusionment by planting bonudary
$enemy_hp = 1
$fight_over = 1
$fight_time = 1
#防止触发一些奇♂奇♂gay♂gay的东西
class Fight < Sprite
def fight_1
if $switches101 = 1
$actor_hp = 20
#角色HP初始化
###############################################################################
#此处补充内容:根据角色设置伤害,并将其代人
$actor_atk = 1
###############################################################################
$actor_x = 20 #横轴(20*2=40→
$actor_y = 25 #数轴(15*2=30↓
$actor_x_ = 320
$actor_y_ = 400
#角色位置初始化(上为判定,下为显示
$atk_time = 0
#攻击冷却初始化
$fight_time = 20
#回合剩余时间初始化
$zd_1_x = 0
$zd_1_y = 0
$zd_2_x = 0
$zd_2_y = 0
$zd_3_x = 0
$zd_3_y = 0
$zd_4_x = 0
$zd_4_y = 0
$zd_5_x = 0
$zd_5_y = 0
$zd_6_x = 0
$zd_6_y = 0
$zd_7_x = 0
$zd_7_y = 0
$zd_8_x = 0
$zd_8_y = 0
$zd_9_x = 0
$zd_9_y = 0
$zd_10_x = 0
$zd_10_y = 0
$zd_11_x = 0
$zd_11_y = 0
$zd_12_x = 0
$zd_12_y = 0
$zd_13_x = 0
$zd_13_y = 0
$zd_14_x = 0
$zd_14_y = 0
$zd_15_x = 0
$zd_15_y = 0
$zd_16_x = 0
$zd_16_y = 0
$zd_17_x = 0
$zd_17_y = 0
$zd_18_x = 0
$zd_18_y = 0
$zd_19_x = 0
$zd_19_y = 0
$zd_20_x = 0
$zd_20_y = 0
$zd_21_x = 0
$zd_21_y = 0
#编号为1-21的子弹的位置初始化
$atk_time = 0
#攻击冷却初始化
$fight_time = 20
#回合剩余时间初始化
$fight_over = 5
#剩余回合初始化
$enemy_hp = 40
#敌人HP初始化
###############################################################################
#此处补充内容:根据战斗场次设置伤害,并将其代人
$enemy_atk = 1
###############################################################################
end
end
def fight_2
if $zd_1_x = $actor_x
if $zd_1_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_2_x = $actor_x
if $zd_2_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_3_x = $actor_x
if $zd_3_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_4_x = $actor_x
if $zd_4_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_5_x = $actor_x
if $zd_5_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_6_x = $actor_x
if $zd_6_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_7_x = $actor_x
if $zd_7_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_8_x = $actor_x
if $zd_8_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_9_x = $actor_x
if $zd_9_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_10_x = $actor_x
if $zd_10_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_11_x = $actor_x
if $zd_11_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_12_x = $actor_x
if $zd_12_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_13_x = $actor_x
if $zd_13_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_14_x = $actor_x
if $zd_14_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_15_x = $actor_x
if $zd_15_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_16_x = $actor_x
if $zd_16_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_17_x = $actor_x
if $zd_17_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_18_x = $actor_x
if $zd_18_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_19_x = $actor_x
if $zd_19_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_20_x = $actor_x
if $zd_20_y = $actor_y
$actor_hp -= $enemy_atk
end
end
if $zd_21_x = $actor_x
if $zd_21_y = $actor_y
$actor_hp -= $enemy_atk
end
end
end
#显示移动自机
def fight_3
# 显示图片
myplane = Sprite.new
myplane.bitmap = RPG::Cache.picture("myplane")
myplane.ox = myplane.bitmap.width / 2
myplane.oy = myplane.bitmap.height / 2
myplane.x = $actor_x_
myplane.y = $actor_y_
end
def fight_4
#删除
myplane.dispose
end
end
alex = Fight.new
alex.fight_1
#Fight攻击系统、移动脚本在Game_Player中(关键词:ukyjthdgfs/mfejnhwn)
#disillusionment by planting bonudary
def fight_3 # 显示图片 @myplane = Sprite.new @myplane.bitmap = RPG::Cache.picture("myplane") @myplane.ox = @myplane.bitmap.width / 2 @myplane.oy = @myplane.bitmap.height / 2 @myplane.x = $actor_x_ @myplane.y = $actor_y_ end def fight_4 #删除 @myplane.dispose end
def fight_3
# 显示图片
@myplane = Sprite.new
@myplane.bitmap = RPG::Cache.picture("myplane")
@myplane.ox = @myplane.bitmap.width / 2
@myplane.oy = @myplane.bitmap.height / 2
@myplane.x = $actor_x_
@myplane.y = $actor_y_
end
def fight_4
#删除
@myplane.dispose
end
|