Created
September 28, 2020 14:55
-
-
Save Avanire/8a3fcaaaea3ee389fd26af56198bbf92 to your computer and use it in GitHub Desktop.
game
game
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
package source.main.game.character; | |
import source.main.game.equipment.Equipment; | |
public abstract class Character implements Skill{ | |
protected final int MAX_LEVEL = 50; | |
} |
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
package source.main.game.character; | |
import source.main.game.equipment.Equipment; | |
public class DamageDealer extends Character{ | |
private final int BASE_HP = 200; | |
private final int BASE_MP = 75; | |
private final int BASE_ATK_POWER = 31; | |
private final int BASE_MGK_POWER = 31; | |
private int currentLevel = 0; | |
private int exp = 0; | |
private final double STR_PER_LVL = 2.2; | |
private final double AGL_PER_LVL = 3.4; | |
private final double INT_PER_LVL = 1.4; | |
private double strength = 21 + (STR_PER_LVL * currentLevel); | |
private double agility = 23 + (AGL_PER_LVL * currentLevel); | |
private double Intelligence = 15 + (INT_PER_LVL * currentLevel); | |
private int hp = BASE_HP + ((int)strength * 20); | |
private int mp = BASE_MP + ((int)Intelligence * 12); | |
private double atkPower = BASE_ATK_POWER + strength; | |
private double armor = agility * 0.16; | |
private double magicArmor = Intelligence * 0.16; | |
//Шлем Броня Правая рука Левая рука Перчатки Ботинки | |
private Equipment[] equipment = new Equipment[6]; | |
@Override | |
public void skillOne() { | |
} | |
@Override | |
public void skillTwo() { | |
} | |
@Override | |
public void skillThree() { | |
} | |
@Override | |
public void skillFour() { | |
} | |
@Override | |
public void skillFive() { | |
} | |
@Override | |
public String toString() { | |
return "DamageDealer{" + | |
"hp=" + hp + | |
", mp=" + mp + | |
", atkPower=" + atkPower + | |
", armor=" + armor + | |
", magicArmor=" + magicArmor + | |
'}'; | |
} | |
} |
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
package source.main.game.character; | |
import source.main.game.equipment.Equipment; | |
public class Mag extends Character{ | |
private final int BASE_HP = 200; | |
private final int BASE_MP = 75; | |
private final int BASE_ATK_POWER = 39; | |
private final int BASE_MGK_POWER = 50; | |
private int currentLevel = 0; | |
private int exp = 0; | |
private final double STR_PER_LVL = 2; | |
private final double AGL_PER_LVL = 2.5; | |
private final double INT_PER_LVL = 3.1; | |
private double strength = 21 + (STR_PER_LVL * currentLevel); | |
private double agility = 23 + (AGL_PER_LVL * currentLevel); | |
private double Intelligence = 25 + (INT_PER_LVL * currentLevel); | |
private int hp = BASE_HP + ((int)strength * 20); | |
private int mp = BASE_MP + ((int)Intelligence * 12); | |
private double atkPower = BASE_ATK_POWER + strength; | |
private double armor = agility * 0.16; | |
private double magicArmor = Intelligence * 0.16; | |
//Шлем Броня Правая рука Левая рука Перчатки Ботинки | |
private Equipment[] equipment = new Equipment[6]; | |
@Override | |
public void skillOne() { | |
} | |
@Override | |
public void skillTwo() { | |
} | |
@Override | |
public void skillThree() { | |
} | |
@Override | |
public void skillFour() { | |
} | |
@Override | |
public void skillFive() { | |
} | |
@Override | |
public String toString() { | |
return "Mag{" + | |
"hp=" + hp + | |
", mp=" + mp + | |
", atkPower=" + atkPower + | |
", armor=" + armor + | |
", magicArmor=" + magicArmor + | |
'}'; | |
} | |
} |
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
package source.main.game.character; | |
public interface Skill { | |
void skillOne(); | |
void skillTwo(); | |
void skillThree(); | |
void skillFour(); | |
void skillFive(); | |
} |
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
package source.main.game.character; | |
import source.main.game.equipment.Equipment; | |
public class Summoner extends Character{ | |
private final int BASE_HP = 200; | |
private final int BASE_MP = 75; | |
private final int BASE_ATK_POWER = 43; | |
private final int BASE_MGK_POWER = 29; | |
private int currentLevel = 0; | |
private int exp = 0; | |
private final double STR_PER_LVL = 2; | |
private final double AGL_PER_LVL = 2.1; | |
private final double INT_PER_LVL = 3.2; | |
private double strength = 25 + (STR_PER_LVL * currentLevel); | |
private double agility = 15 + (AGL_PER_LVL * currentLevel); | |
private double Intelligence = 19 + (INT_PER_LVL * currentLevel); | |
private int hp = BASE_HP + ((int)strength * 20); | |
private int mp = BASE_MP + ((int)Intelligence * 12); | |
private double atkPower = BASE_ATK_POWER + strength; | |
private double armor = agility * 0.16; | |
private double magicArmor = Intelligence * 0.16; | |
//Шлем Броня Правая рука Левая рука Перчатки Ботинки | |
private Equipment[] equipment = new Equipment[6]; | |
@Override | |
public void skillOne() { | |
} | |
@Override | |
public void skillTwo() { | |
} | |
@Override | |
public void skillThree() { | |
} | |
@Override | |
public void skillFour() { | |
} | |
@Override | |
public void skillFive() { | |
} | |
@Override | |
public String toString() { | |
return "Summoner{" + | |
"hp=" + hp + | |
", mp=" + mp + | |
", atkPower=" + atkPower + | |
", armor=" + armor + | |
", magicArmor=" + magicArmor + | |
'}'; | |
} | |
} |
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
package source.main.game.character; | |
import source.main.game.equipment.Equipment; | |
public class Support extends Character{ | |
private final int BASE_HP = 200; | |
private final int BASE_MP = 75; | |
private final int BASE_ATK_POWER = 49; | |
private final int BASE_MGK_POWER = 35; | |
private int currentLevel = 0; | |
private int exp = 0; | |
private final double STR_PER_LVL = 2.3; | |
private final double AGL_PER_LVL = 1.4; | |
private final double INT_PER_LVL = 3.3; | |
private double strength = 18 + (STR_PER_LVL * currentLevel); | |
private double agility = 13 + (AGL_PER_LVL * currentLevel); | |
private double Intelligence = 22 + (INT_PER_LVL * currentLevel); | |
private int hp = BASE_HP + ((int)strength * 20); | |
private int mp = BASE_MP + ((int)Intelligence * 12); | |
private double atkPower = BASE_ATK_POWER + strength; | |
private double armor = agility * 0.16; | |
private double magicArmor = Intelligence * 0.16; | |
//Шлем Броня Правая рука Левая рука Перчатки Ботинки | |
private Equipment[] equipment = new Equipment[6]; | |
@Override | |
public void skillOne() { | |
} | |
@Override | |
public void skillTwo() { | |
} | |
@Override | |
public void skillThree() { | |
} | |
@Override | |
public void skillFour() { | |
} | |
@Override | |
public void skillFive() { | |
} | |
@Override | |
public String toString() { | |
return "Support{" + | |
"hp=" + hp + | |
", mp=" + mp + | |
", atkPower=" + atkPower + | |
", armor=" + armor + | |
", magicArmor=" + magicArmor + | |
'}'; | |
} | |
} |
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
package source.main.game.character; | |
import source.main.game.equipment.Equipment; | |
public class Tank extends Character{ | |
private final int BASE_HP = 200; | |
private final int BASE_MP = 75; | |
private final int BASE_ATK_POWER = 50; | |
private final int BASE_MGK_POWER = 0; | |
private int currentLevel = 0; | |
private int exp = 0; | |
private double strength = 25; | |
private double agility = 20; | |
private double intelligence = 18; | |
private int hp = BASE_HP; | |
private int mp = BASE_MP; | |
private double atkPower = BASE_ATK_POWER + strength; | |
private double armor = agility * 0.16; | |
private double magicArmor = intelligence * 0.16; | |
//Шлем Броня Правая рука Левая рука Перчатки Ботинки | |
private Equipment[] equipment = new Equipment[6]; | |
public void setExp(int exp) { | |
if(exp >= (1000 + (1000 * currentLevel)) || (this.exp + exp) >= (1000 + (1000 * currentLevel))){ | |
currentLevel++; | |
double STR_PER_LVL = 3.4; | |
double AGL_PER_LVL = 2; | |
double INT_PER_LVL = 1.7; | |
strength += Math.ceil(STR_PER_LVL * currentLevel); | |
agility += Math.ceil(AGL_PER_LVL * currentLevel); | |
intelligence += Math.ceil(INT_PER_LVL * currentLevel); | |
hp = BASE_HP + ((int)strength * 20); | |
mp = BASE_MP + ((int)intelligence * 12); | |
atkPower = BASE_ATK_POWER + strength; | |
armor = agility * 0.16; | |
magicArmor = intelligence * 0.16; | |
this.exp = (this.exp + exp) - (1000 * currentLevel); | |
}else { | |
this.exp += exp; | |
} | |
} | |
//Пасивный бонус к броне | |
@Override | |
public void skillOne() { | |
} | |
@Override | |
public void skillTwo() { | |
} | |
@Override | |
public void skillThree() { | |
} | |
@Override | |
public void skillFour() { | |
} | |
@Override | |
public void skillFive() { | |
} | |
@Override | |
public String toString() { | |
return "Tank{" + | |
"currentLevel=" + currentLevel + | |
", exp=" + exp + | |
", strength=" + strength + | |
", agility=" + agility + | |
", Intelligence=" + intelligence + | |
", hp=" + hp + | |
", mp=" + mp + | |
", atkPower=" + atkPower + | |
", armor=" + armor + | |
", magicArmor=" + magicArmor + | |
'}'; | |
} | |
} |
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
package source.main.game.equipment; | |
public abstract class Equipment { | |
} |
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
package source.main.game.game; | |
import source.main.game.character.*; | |
import source.main.game.character.Character; | |
public class Game { | |
public static void main(String[] args) { | |
Tank tank = new Tank(); | |
Mag mag = new Mag(); | |
DamageDealer dd = new DamageDealer(); | |
Summoner summoner = new Summoner(); | |
Support support = new Support(); | |
Character ch; | |
ch = tank; | |
System.out.println(ch); | |
tank.setExp(1000); | |
System.out.println(ch); | |
tank.setExp(50); | |
System.out.println(ch); | |
tank.setExp(2500); | |
System.out.println(ch); | |
} | |
} |
package source.main.game.character;
import source.main.game.equipment.Equipment;
public class Mag extends Character{
private final int BASE_HP = 200;
private final int BASE_MP = 75;
private final int BASE_ATK_POWER = 39;
private final int BASE_MGK_POWER = 50;
private int currentLevel = 0;
private int exp = 0;
private final double STR_PER_LVL = 2;
private final double AGL_PER_LVL = 2.5;
private final double INT_PER_LVL = 3.1;
private double strength = 21 + (STR_PER_LVL * currentLevel);
private double agility = 23 + (AGL_PER_LVL * currentLevel);
private double Intelligence = 25 + (INT_PER_LVL * currentLevel);
private int hp = BASE_HP + ((int)strength * 20);
private int mp = BASE_MP + ((int)Intelligence * 12);
private double atkPower = BASE_ATK_POWER + strength;
private double armor = agility * 0.16;
private double magicArmor = Intelligence * 0.16;
//Шлем Броня Правая рука Левая рука Перчатки Ботинки
private Equipment[] equipment = new Equipment[6];
@Override
public void skillOne() {
}
@Override
public void skillTwo() {
}
@Override
public void skillThree() {
}
@Override
public void skillFour() {
}
@Override
public void skillFive() {
}
@Override
public String toString() {
return "Mag{" +
"hp=" + hp +
", mp=" + mp +
", atkPower=" + atkPower +
", armor=" + armor +
", magicArmor=" + magicArmor +
'}';
}
}
Radio hub is one of the most popular Roblox games today, attracting millions of players. There are countless scripts available online to enhance your gameplay, but after the Dragon update, many of these scripts stopped working.
One that was widely used, called RedSub, was affected by this update as well. However, there’s good news: RedSub has released a new script, and it’s not the only one.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice