[core] name: 激光牵引 strictLevel: 1 price: 0 radius: 10 mass: 1 maxHp: 1 class: CustomUnitMetadata techLevel: 1 showInEditor: false tags: 激光,不可检测 createOnAggressiveTeam: true canNotBeDamaged: true canOnlyBeAttackedByUnitsWithTags: 激光炮塔 isUnrepairableUnit: true isUnselectable: true disableAllUnitCollisions: true ignoreInUnitCapCalculation: true disableDeathOnZeroHp: true # 零生命值时不死亡 [graphics] image:SHARED:blank.png isVisible: false [attack] canAttack: true canAttackFlyingUnits: true canAttackLandUnits: true canAttackUnderwaterUnits: true maxAttackRange: 3 [turret_1] # 传送用的,拦截主体攻击的子弹 x: 0 y: 0 projectile: 1 resourceUsage: setFlag= 0, hasMissingFlag= 0 canAttack: false canAttackFlyingUnits: true canAttackLandUnits: true canAttackUnderwaterUnits: true interceptProjectiles_withTags: 拦截 interceptProjectiles_andTargetingGroundUnderDistance: 142857 interceptProjectiles_andUnderDistance: 15 interceptProjectiles_andOverHeight: -100 onShoot_triggerActions: 1 [projectile_1] # 传送用的,拦截主体攻击的子弹 life: 30 speed: 0 targetSpeed: 72 targetSpeedAcceleration: 8 deflectionPower: -1 directDamage: 0 teleportSource: true invisible: true spawnProjectilesOnCreate: 2 # 顺便生成子弹2 explodeEffect: none explodeEffectOnShield: none [projectile_2] tags: 拦截2 # 让激光炮塔拦截用的子弹 life: 30 speed: 0 deflectionPower: -1 directDamage: 0 invisible: true explodeEffect: none [hiddenAction_1] # 脱离母体,启动自杀 disconnectFromParent: true alsoQueueAction: 2 [hiddenAction_2] # 自杀 buildSpeed: 5s deleteSelf: true [hiddenAction_3] # 中立敌对 用动作锁定攻击主体 autoTrigger: if self.hasParent() addWaypoint_type: attack addWaypoint_target_nearestUnit_tagged: 激光炮塔 addWaypoint_target_nearestUnit_team: enemy addWaypoint_target_nearestUnit_maxRange: 9 [movement] movementType: AIR moveSpeed: -2 moveAccelerationSpeed: 0.01 # 改小加速度能做出先慢后快的效果 maxTurnSpeed: 0 targetHeight: 0 targetHeightDrift: 0 moveIgnoringBody: true