Login
Create
Tawo

귀멸의 칼날RPG

This code is over 6 months old. The code may have expired and might no longer function.

from enum import Enum

class Breaths(Enum):
WATER = 1
THUNDER = 2
WIND = 3
FIRE = 4
MIST = 5
SOUND = 6
BEAST = 7
LOVE = 8
SNAKE = 9
ROCK = 10
SUN = 11
MOON = 12

breath_skills = {
Breaths.WATER: "Water Breath",
Breaths.THUNDER: "Thunder Breath",
Breaths.WIND: "Wind Breath",
Breaths.FIRE: "Fire Breath",
Breaths.MIST: "Mist Breath",
Breaths.SOUND: "Sound Breath",
Breaths.BEAST: "Beast Breath",
Breaths.LOVE: "Love Breath",
Breaths.SNAKE: "Snake Breath",
Breaths.ROCK: "Rock Breath",
Breaths.SUN: "Sun Breath",
Breaths.MOON: "Moon Breath",
}

플레이어 클래스

class Player:
def init(self):
self.breathgauge = 0 # 호흡 게이지 초기값
self.level = 1 # 레벨 초기값
self.money = 0 # 돈 초기값
self.moon
shard = 0 # 달의 조각 초기값

# 호흡 게이지를 충전하는 함수
def fillbreathgauge(self):
self.breath_gauge += 1

# 호흡 게이지를 소비하는 함수
def consumebreathgauge(self, breath):
if self.breathgauge == 0:
print("호흡 게이지가 부족합니다.")
return False
else:
self.breath
gauge -= 1
print(f"{breath_skills[breath]} 스킬을 사용합니다!")
return True

# 레벨을 증가시키는 함수
def level_up(self):
self.level += 1
print(f"레벨이 {self.level}이 되었습니다.")

# 돈을 증가시키는 함수
def increase_money(self, amount):
self.money += amount
print(f"돈이 {self.money}원 증가하였습니다.")

# 달의 조각을 증가시키는 함수
def increasemoonshard(self):
self.moon
ruleset("Workshop Experiments") {
global {
// 호흡과 스킬, 게이지바, 오니
array breaths = ["Water", "Thunder", "Wind", "Fire", "Mist", "Sound", "Beast", "Love", "Serpent", "Rock", "Sun", "Moon"]
array skills = ["Skill 1", "Skill 2", "Skill 3", "Skill 4"]
array strongOonis = []
int maxBreathLevel = 10000
int maxLevel = 50
int breathGauge = 0
int money = 0
int experience = 0
int level = 1

rule("Spawn Ooni") {
wait(1 minute)
createOoni()
}

rule("Spawn Strong Ooni") {
wait(10 minute)
createStrongOoni()
}

function createOoni() {
int x = randomInteger(-50, 50)
int y = randomInteger(-50, 50)
create entity("Ooni", All Teams, x, y, 0)
}

function createStrongOoni() {
int x = randomInteger(-50, 50)
int y = randomInteger(-50, 50)
create entity("Strong Ooni", All Teams, x, y, 0)
strongOonis.append(last created entity)
}
}

// 호흡 스킬 구현
for (breath in breaths) {
int breathLevel = 0
int breathCost = 1000
if (breath == "Sun" || breath == "Moon") {
breathCost = 10000
}
rule("Increase breath gauge when sitting and decrease gradually") {
event
{
Ongoing - Each Player;
Is Button Held(Event Player, Jump);
}
conditions
{
not(Event Player.Is Using Ability 1);
}
actions
{
breathGauge += 1;
}
}

rule("Decrease breath gauge gradually when not sitting") {
event
{
Ongoing - Each Player;
Is Not Button Held(Event Player, Jump);
}
conditions
{
not(Event Player.Is Using Ability 1);
}
actions
{
breathGauge -= 1;
}
}

rule("Decrease breath gauge when using skill 1") {
event
{
Ongoing - Each Player;
Is Button Pressed(Event Player, Ability 1);
}
conditions
{
breathGauge >= breathCost;
}
actions
{
breathGauge -= breathCost;
breathLevel += 1;
}
}

rule("Decrease breath gauge when using skill 2") {
event
{
Ongoing - Each Player;
Is Button Pressed(Event Player, Ability 2);
}
conditions
{
breathGauge >= breathCost * 2;
}
actions

Players | 1 - 8
Categories: Free for all
Heroes: Genji
Maps: Hanamura
Created at:
Last updated:

Users Also Like

Similar Codes

Join the Workshop.codes Discord