This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from enum import Enum | |
# DOTA Constraints | |
MAX_LEVEL = 50 | |
HP_PER_TAI = 22.0 | |
CHAKRA_PER_GEN = 12 | |
STARTING_MAGIC_RESIST = 0.25 | |
MAGIC_RESIST_PER_GEN = 0.001 | |
XP_REQUIRED = [0, 0] | |
for i in range(1, MAX_LEVEL): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Author: PicoleDeLimao | |
Date: 11.14.2023 | |
Implement Sasuke Amaterasu ability | |
]] | |
function SpellStart(event) | |
local caster = event.caster | |
local ability = event.ability | |
local target = event.target_points[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Developer { | |
private Role role; | |
protected void setRole(Role role) { | |
this.role = role; | |
} | |
public double getSalary() { | |
return this.role.getSalary(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Senior implements Role { | |
@Override | |
public double getSalary() { | |
return 4000; | |
} | |
@Override | |
public boolean promote(Developer context) { | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Expert implements Role { | |
@Override | |
public double getSalary() { | |
return 2000; | |
} | |
@Override | |
public boolean promote(Developer context) { | |
context.setRole(new Senior()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Junior implements Role { | |
@Override | |
public double getSalary() { | |
return 1000; | |
} | |
@Override | |
public boolean promote(Developer context) { | |
context.setRole(new Expert()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Trainee implements Role { | |
@Override | |
public double getSalary() { | |
return 500; | |
} | |
@Override | |
public boolean promote(Developer context) { | |
context.setRole(new Junior()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Role { | |
public double getSalary(); | |
public boolean promote(Developer context); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Developer { | |
private Role role; | |
public double getSalary() { | |
switch(this.role) { | |
case TRAINEE: | |
return 500; | |
case JUNIOR: | |
return 1000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum Role { | |
TRAINEE, JUNIOR, EXPERT, SENIOR | |
} |
NewerOlder