Skip to content

Library for adding Custom Characters that can spawn Friendly Minions

Notifications You must be signed in to change notification settings

Kobting/STSFriendlyMinions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

Repository files navigation

STSFriendlyMinions

Library for adding Custom Characters that can spawn Friendly Minions

Currently in Beta and open for testing. Appreciate any bug reports.

Requirements

Example GetLoadout

public static CharSelectInfo getLoadout() {

    CharSelectInfo info = new CustomCharSelectInfo(
            "Character Name",
            "Character Flavor",
            80, //currentHP
            80, //maxHP
            0,  //maxOrbs
            2,  //maxMinions
            99, //gold
            5,  //cardDraw
            this,
            getStartingRelics(),
            getStartingDeck(),
            false);

    return info;
}

Example FriendlyMinion

public class TestMinion extends AbstractFriendlyMonster {
    
    private static String NAME = "Testing Minion";
    private static String ID = "TestingMinion";
    private AbstractMonster target;

    public TestMinion(int offsetX, int offsetY) {
        super(NAME, ID, 20, -8.0F, 10.0F, 230.0F, 240.0F, "images/monsters/monster_testing.png", offsetX, offsetY);
        addMoves();
    }

    private void addMoves(){
        this.moves.addMove(new MinionMove("Attack", this, new Texture("images/monsters/atk_bubble.png"), "Deal 5 damage", () -> {
            target = AbstractDungeon.getRandomMonster();
            DamageInfo info = new DamageInfo(this,5,DamageInfo.DamageType.NORMAL);
            info.applyPowers(this, target); // <--- This lets powers effect minions attacks
            AbstractDungeon.actionManager.addToBottom(new DamageAction(target, info));
        }));
        this.moves.addMove(new MinionMove("Defend", this, new Texture("images/monsters/atk_bubble.png"),"Gain 5 block", () -> {
            AbstractDungeon.actionManager.addToBottom(new GainBlockAction(this,this, 5));
        }));
    }
}

Example use method for a Card to summon a minion with CustomCharacter

public void use(AbstractPlayer abstractPlayer, AbstractMonster abstractMonster) {
    if(abstractPlayer instanceof AbstractPlayerWithMinions) {
        AbstractPlayerWithMinions player = (AbstractPlayerWithMinions) abstractPlayer;
        player.addMinion(companion);
    }
}

Example use method for a Card to summon a minion with BaseCharacter

public void use(AbstractPlayer abstractPlayer, AbstractMonster abstractMonster) {
    BasePlayerMinionHelper.addMinion(abstractPlayer, companion);
}

About

Library for adding Custom Characters that can spawn Friendly Minions

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages