Skip to content

Create Poppy playtime#1370

Open
collcolrol-cyber wants to merge 1 commit intoR74nCom:mainfrom
collcolrol-cyber:patch-2
Open

Create Poppy playtime#1370
collcolrol-cyber wants to merge 1 commit intoR74nCom:mainfrom
collcolrol-cyber:patch-2

Conversation

@collcolrol-cyber
Copy link
Copy Markdown

Poppy playtime

Poppy playtime
@collcolrol-cyber
Copy link
Copy Markdown
Author

@collcolrol-cyber
Copy link
Copy Markdown
Author

outputCode.txt

@collcolrol-cyber
Copy link
Copy Markdown
Author

// Import Sandboxels modding API (assuming it's available globally or via import)
import { registerMod, createEntity, addBehavior, addItem } from 'sandboxels-api';

// Define Poppy Playtime themed boxers mod
const poppyPlaytimeBoxersMod = {
id: 'poppyplaytime-boxers',
name: 'Poppy Playtime Boxers Mod',
description: 'Adds Poppy Playtime themed boxers with human-like behavior',
version: '1.0.0',
author: 'ModAuthor',

init() {
// Create a new boxer entity with Poppy Playtime style
const poppyBoxer = createEntity({
id: 'poppy-boxer',
name: 'Poppy Playtime Boxer',
sprite: 'poppy_boxer_sprite.png', // Assume sprite asset is available
health: 100,
attack: 15,
defense: 10,
speed: 5,
behaviors: [],
});

// Add human-like behavior
addBehavior(poppyBoxer, {
  type: 'human',
  walkSpeed: 3,
  runSpeed: 6,
  interact() {
    console.log('Poppy Playtime Boxer says: "Let\'s play!"');
  },
  attack(target) {
    console.log(`Poppy Playtime Boxer attacks ${target.name} with a punch!`);
    target.takeDamage(this.attack);
  },
  takeDamage(amount) {
    this.health -= amount;
    if (this.health <= 0) {
      this.die();
    }
  },
  die() {
    console.log('Poppy Playtime Boxer has been defeated!');
    // Remove entity from game world
    this.remove();
  },
});

// Register the new boxer entity
addItem(poppyBoxer);

// Optionally add a spawn item or boxers mod box
const boxersModBox = createEntity({
  id: 'boxers-mod-box',
  name: 'Boxers Mod Box',
  sprite: 'boxers_mod_box_sprite.png',
  interact() {
    // Spawn a Poppy Playtime Boxer when opened
    const spawnedBoxer = poppyBoxer.clone();
    spawnedBoxer.spawnAt(this.position);
    console.log('Boxers Mod Box opened: Poppy Playtime Boxer spawned!');
    this.remove();
  },
});

addItem(boxersModBox);

},
};

// Register the mod with Sandboxels
registerMod(poppyPlaytimeBoxersMod);

@collcolrol-cyber
Copy link
Copy Markdown
Author

pom.xml

@collcolrol-cyber
Copy link
Copy Markdown
Author

outputCode 2.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant