race 效果(1-110)

博客介绍了多种游戏怪物的攻击特性及效果。包括大刀、鸡、羊、狼等怪物,有的不主动攻击,有的进入范围攻击,还有的具备石化、电、火等攻击效果,以及躲避、复活等特殊能力。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

rece 效果
11 大刀,站立不动,被攻击后移动到你面前攻击,不主动攻击
20 类似赤月,但范围小,半屏,不主动攻击
31 鸡,不主动攻击
51 不攻击,掉落物品需要割
52 羊,鹿,不主动攻击,有几率逃跑,掉落物品需要割
53 狼,进入范围攻击
55 练功师
80 不主动攻击
81 主动攻击
82 2×2毒攻击
83 主动攻击
85 食人花,隐藏
86  主动攻击
87 躲避攻击
88 主动攻击
89 主动攻击
90 洞蛆,石化攻击
91 火攻击效果
92 沃玛教主,电攻击效果
93 爆毒蚂蚁,躲避攻击,魔法
94 激光电影
95 钻地僵尸
96 复活
97 主动攻击
100  召唤的骷髅
101 石像复活
102  祖玛教主
103 角蝇
104 躲避攻击
105 石化麻痹攻击
106 石化攻击
107 触龙神
108 不能持续攻击
改进以下代码使其更快 #! /usr/bin/env python # @Source: https://www.guyuehome.com/35146 # @Time: 2023/10/20 17:02:46 # @Author: Jeff Wang(Lr_2002) # LastEditors: sujit-168 su2054552689@gmail.com # LastEditTime: 2024-03-22 10:23:42 import os import rospy, rospkg import actionlib # 引用 actionlib 库 import waypoint_race.utils as utils import move_base_msgs.msg as move_base_msgs import visualization_msgs.msg as viz_msgs class RaceStateMachine(object): def __init__(self, filename, repeat=True): """ init RaceStateMachine filename: path to your yaml file reapeat: determine whether to visit waypoints repeatly(usually True in 110) """ self._waypoints = utils.get_waypoints(filename) # 获取一系列目标点的值 action_name = 'move_base' self._ac_move_base = actionlib.SimpleActionClient(action_name, move_base_msgs.MoveBaseAction) # 创建一个 SimpleActionClient rospy.loginfo('Wait for %s server' % action_name) self._ac_move_base.wait_for_server self._counter = 0 self._repeat = repeat # 以下为了显示目标点: self._pub_viz_marker = rospy.Publisher('viz_waypoints', viz_msgs.MarkerArray, queue_size=1, latch=True) self._viz_markers = utils.create_viz_markers(self._waypoints) def move_to_next(self): pos = self._get_next_destination() if not pos: rospy.loginfo("Finishing Race") return True # 把文件读取的目标点信息转换成 move_base 的 goal 的格式: goal = utils.create_move_base_goal(pos) rospy.loginfo("Move to %s" % pos['name']) # 这里也是一句很简单的 send_goal: self._ac_move_base.send_goal(goal) self._ac_move_base.wait_for_result() result = self._ac_move_base.get_result() rospy.loginfo("Result : %s" % result) return False def _get_next_destination(self): """ determine what's the next goal point according to repeat """ if self._counter == len(self._waypoints): if self._repeat: self._counter = 0 else: next_destination = None next_destination = self._waypoints[self._counter] self._counter = self._counter + 1 return next_destination def spin(self): rospy.sleep(1.0) self._pub_viz_marker.publish(self._viz_markers) finished = False while not rospy.is_shutdown() and not finished: finished = self.move_to_next() rospy.sleep(2.0) if __name__ == '__main__': rospy.init_node('race') package_name = "tianracer_gazebo" # Get the package path try: pkg_path = rospkg.RosPack().get_path(package_name) # Construct the path to scripts directory filename= os.path.join(pkg_path, "scripts/waypoint_race/points.yaml") print(f"yaml: {filename}") except rospkg.ResourceNotFound: rospy.logerr("Package '%s' not found" % package_name) exit(1) filename = rospy.get_param("~filename",filename) repeat = rospy.get_param('~repeat', True) m = RaceStateMachine(filename, repeat) rospy.loginfo('Initialized') m.spin() rospy.loginfo('Finished')
最新发布
06-17
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值