No A.I. update for Azulians, Crusher, Snake, Thief
This commit is contained in:
parent
79a6056834
commit
c77b7b0034
|
@ -22,6 +22,7 @@ build:
|
|||
# Tag the category for these doodads
|
||||
for i in *.doodad; do\
|
||||
doodad edit-doodad --tag "category=creatures" $${i};\
|
||||
doodad edit-doodad -q --option "No A.I.=bool" $${i};\
|
||||
done
|
||||
|
||||
cp *.doodad ../../../assets/doodads/
|
||||
|
|
|
@ -5,7 +5,7 @@ var playerSpeed = color === 'blue' ? 2 : 4,
|
|||
swimSpeed = playerSpeed * 0.4,
|
||||
aggroX = 250, // X/Y distance sensitivity from player
|
||||
aggroY = color === 'blue' ? 100 : 200,
|
||||
jumpSpeed = color === 'blue' ? 14 : 18,
|
||||
jumpSpeed = color === 'blue' ? 10 : 11,
|
||||
swimJumpSpeed = jumpSpeed * 0.4,
|
||||
animating = false,
|
||||
direction = "right",
|
||||
|
@ -15,9 +15,9 @@ var playerSpeed = color === 'blue' ? 2 : 4,
|
|||
if (color === 'white') {
|
||||
aggroX = 1000;
|
||||
aggroY = 400;
|
||||
playerSpeed = 8;
|
||||
playerSpeed = 5;
|
||||
swimSpeed = playerSpeed * 0.4;
|
||||
jumpSpeed = 20;
|
||||
jumpSpeed = 12;
|
||||
swimJumpSpeed = jumpSpeed * 0.4;
|
||||
}
|
||||
|
||||
|
@ -32,8 +32,6 @@ function setupAnimations(color) {
|
|||
}
|
||||
|
||||
function main() {
|
||||
playerSpeed = color === 'blue' ? 2 : 4;
|
||||
|
||||
let swimJumpCooldownTick = 0, // minimum Game Tick before we can jump while swimming
|
||||
swimJumpCooldown = 10; // CONFIG: delta of ticks between jumps while swimming
|
||||
|
||||
|
@ -47,6 +45,11 @@ function main() {
|
|||
return playerControls();
|
||||
}
|
||||
|
||||
// No A.I.?
|
||||
if (Self.GetOption("No A.I.") === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
// A.I. pattern: walks back and forth, turning around
|
||||
// when it meets resistance.
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ build:
|
|||
# Tag the category for these doodads
|
||||
for i in *.doodad; do\
|
||||
doodad edit-doodad --tag "category=creatures" $${i};\
|
||||
doodad edit-doodad -q --option "No A.I.=bool" $${i};\
|
||||
done
|
||||
|
||||
cp *.doodad ../../../assets/doodads/
|
|
@ -17,8 +17,8 @@ let direction = "left",
|
|||
fallRadius = 120, // player distance before it drops
|
||||
helmetThickness = 48, // safe solid hitbox height
|
||||
fireThickness = 12, // dangerous bottom thickness
|
||||
targetAltitude = Self.Position()
|
||||
lastAltitude = targetAltitude.Y
|
||||
targetAltitude = Self.Position(),
|
||||
lastAltitude = targetAltitude.Y,
|
||||
size = Self.Size();
|
||||
|
||||
const states = {
|
||||
|
@ -48,6 +48,11 @@ function main() {
|
|||
return player();
|
||||
}
|
||||
|
||||
// No A.I.?
|
||||
if (Self.GetOption("No A.I.") === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
let hitbox = Self.Hitbox();
|
||||
|
||||
Events.OnCollide((e) => {
|
||||
|
|
|
@ -10,6 +10,7 @@ build:
|
|||
# Tag the category for these doodads
|
||||
for i in *.doodad; do\
|
||||
doodad edit-doodad --tag "category=creatures" $${i};\
|
||||
doodad edit-doodad -q --option "No A.I.=bool" $${i};\
|
||||
done
|
||||
|
||||
cp *.doodad ../../../assets/doodads/
|
|
@ -34,6 +34,11 @@ function main() {
|
|||
return player();
|
||||
}
|
||||
|
||||
// No A.I.?
|
||||
if (Self.GetOption("No A.I.") === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
Events.OnCollide((e) => {
|
||||
// The snake is deadly to the touch.
|
||||
if (e.Settled && e.Actor.IsPlayer() && e.InHitbox) {
|
||||
|
|
|
@ -10,5 +10,6 @@ build:
|
|||
doodad install-script thief.js thief.doodad
|
||||
|
||||
doodad edit-doodad --tag "category=creatures" thief.doodad
|
||||
doodad edit-doodad -q --option "No A.I.=bool" thief.doodad
|
||||
|
||||
cp *.doodad ../../../assets/doodads/
|
||||
|
|
|
@ -15,6 +15,12 @@ function main() {
|
|||
if (Self.IsPlayer()) {
|
||||
return playable();
|
||||
}
|
||||
|
||||
// No A.I.?
|
||||
if (Self.GetOption("No A.I.") === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
return ai();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user