add visualRadius

This commit is contained in:
2025-01-17 17:51:00 +09:00
parent a44693aa5d
commit 80ccb92815
6 changed files with 76 additions and 59 deletions
+13 -11
View File
@@ -30,9 +30,10 @@ export default class Ability {
name: 'Straight Shot',
castTime: 0.25,
cooldown: 1,
damage: 10,
damage: 83,
radius: 60,
range: 1200,
visualRadius: 20,
speed: 2000,
effect: function straightShotEffect(caster, cursor) {
const ability = this
@@ -47,6 +48,7 @@ export default class Ability {
position: caster.position.clone(),
radius: ability.radius,
speed: ability.speed,
visualRadius: ability.visualRadius,
})
projectile.destination = caster.position.clone().add(cursor.clone().sub(caster.position).normalize().multiplyScalar(ability.range + caster.radius))
@@ -58,13 +60,13 @@ export default class Ability {
static rangedAttack = new Ability({
id: 'ranged_attack',
name: 'Ranged Attack',
castTime: 0.25,
cooldown: 1.25,
damage: 25,
castTime: (1.6 * 0.18839),
cooldown: 1.6,
damage: 60,
moveCancelable: true,
radius: 5,
range: 500,
speed: 600,
speed: 2000,
effect: function rangedAttackEffect(caster, cursor) {
const ability = this
const target = caster.closestTargetTo(cursor, ability.range)
@@ -110,11 +112,11 @@ export default class Ability {
static shieldThrow = new Ability({
id: 'shield_throw',
name: 'Shield Throw',
castTime: 0.15,
castTime: 0.25,
cooldown: 5,
radius: 20,
range: 1000,
speed: 2000,
radius: 110,
range: 1025,
speed: 2400,
effect: function shieldThrowEffect(caster, cursor) {
const ability = this
const shieldThrowReturn = function shieldThrowReturn(projectile, homingTarget) {
@@ -146,9 +148,9 @@ export default class Ability {
static blink = new Ability({
id: 'blink',
name: 'Blink',
castTime: 1,
castTime: 0.25,
cooldown: 2,
range: 400,
range: 475,
effect: function blinkEffect(caster, cursor) {
const ability = this
const direction = cursor.clone().sub(caster.position)