Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General minigame overhaul #134

Draft
wants to merge 112 commits into
base: development
Choose a base branch
from

Conversation

Plajer
Copy link
Collaborator

@Plajer Plajer commented Sep 5, 2022

This pull request includes updates for Wizard, Medic and Tornado (not fully completed) kits as well as Entity Upgrades system (mostly messages).

Pardon any other changes such as old copyright updates and others.
Please review each file changed carefully.

@Plajer Plajer requested a review from Tigerpanzer02 September 5, 2022 14:56
@Plajer Plajer marked this pull request as draft September 5, 2022 17:41
Copy link
Member

@Tigerpanzer02 Tigerpanzer02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments ;)

@@ -1,6 +1,6 @@
/*
* Village Defense - Protect villagers from hordes of zombies
* Copyright (c) 2022 Plugily Projects - maintained by Tigerpanzer_02 and contributors
* Copyright (C) 2022 Plugily Projects - maintained by 2Wild4You, Tigerpanzer_02 and contributors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't change

@@ -1,6 +1,6 @@
/*
* Village Defense - Protect villagers from hordes of zombies
* Copyright (c) 2022 Plugily Projects - maintained by Tigerpanzer_02 and contributors
* Copyright (C) 2022 Plugily Projects - maintained by 2Wild4You, Tigerpanzer_02 and contributors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't change

Comment on lines 447 to 448
getMessageManager().registerMessage("KIT_CONTENT_MEDIC_GAME_ITEM_HOMECOMING_RESPAWNED_BY_TITLE", new Message("Kit.Content.Medic.Game-Item.Homecoming.Respawned-By-Title", ""));
getMessageManager().registerMessage("KIT_CONTENT_MEDIC_GAME_ITEM_HOMECOMING_RESPAWNED_BY_SUBTITLE", new Message("Kit.Content.Medic.Game-Item.Homecoming.Respawned-By-Subtitle", ""));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -1,6 +1,6 @@
/*
* Village Defense - Protect villagers from hordes of zombies
* Copyright (c) 2022 Plugily Projects - maintained by Tigerpanzer_02 and contributors
* Copyright (C) 2022 Plugily Projects - maintained by 2Wild4You, Tigerpanzer_02 and contributors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't change

@@ -1,6 +1,6 @@
/*
* Village Defense - Protect villagers from hordes of zombies
* Copyright (c) 2022 Plugily Projects - maintained by Tigerpanzer_02 and contributors
* Copyright (C) 2022 Plugily Projects - maintained by 2Wild4You, Tigerpanzer_02 and contributors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't change

VersionUtils.sendParticles("TOWN_AURA", null, loc, 5, 0, 0, 0);
for(Entity en : loc.getChunk().getEntities()) {
if(!(CreatureUtils.isEnemy(en)) || en.getLocation().distance(loc) >= 1.5 || en.equals(player)) {
for (Entity en : loc.getChunk().getEntities()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

entity, livingEntity

}

private void applyMagicAttack(Player player) {
private void applyMagicAttack(User user) {
XParticle.drawLine(user.getPlayer(), 40, 1, ParticleDisplay.of(XParticle.getParticle("FLAME")));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.8 issue

//wand damage: 30/32/35 scaling % of entity's max health, we use direct health set to override armors etc.
entity.damage(0, user.getPlayer());
double maxHealthPercent = getWandPercentageDamage(arena);
entity.setHealth(Math.max(0, entity.getHealth() - (entity.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue() / 100.0) * maxHealthPercent));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use VersionUtil getMaxHealth Attributes will cause issues on direct call for legacy versions

Copy link
Member

@Tigerpanzer02 Tigerpanzer02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notice we need to check if that versioncheck will already be enough for 1.8

pom.xml Outdated
<changelogFile>${project.basedir}/CHANGELOG.md</changelogFile>
</configuration>
</plugin>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let betty inside

Comment on lines 447 to 448
getMessageManager().registerMessage("KIT_CONTENT_MEDIC_GAME_ITEM_HOMECOMING_RESPAWNED_BY_TITLE", new Message("Kit.Content.Medic.Game-Item.Homecoming.Respawned-By-Title", ""));
getMessageManager().registerMessage("KIT_CONTENT_MEDIC_GAME_ITEM_HOMECOMING_RESPAWNED_BY_SUBTITLE", new Message("Kit.Content.Medic.Game-Item.Homecoming.Respawned-By-Subtitle", ""));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still two titles?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its possible to use the newly added TitleBuilder from MinigamesBox which let you combine both in one.
e.g.
new TitleBuilder("TITLE").asKey().arena(arena).player(player).sendPlayer();
Title: "20,30,20;%arena_name%;%arena_players_size%/%arena_max_players%"

@Plajer
Copy link
Collaborator Author

Plajer commented Sep 26, 2022

todo: abilities registry

@Plajer
Copy link
Collaborator Author

Plajer commented Sep 26, 2022

todo: let each kit register messages for game on their own, not in main class

@Plajer
Copy link
Collaborator Author

Plajer commented Sep 26, 2022

todo: percentage damage utils to reduce 3 lines into 1 line utility, it will definitely be used across multiple kits

@Plajer
Copy link
Collaborator Author

Plajer commented Oct 26, 2022

will finish it someday definitely

@Tigerpanzer02
Copy link
Member

will finish it someday definitely

hopefully next week xD ;)

@Plajer
Copy link
Collaborator Author

Plajer commented Nov 17, 2022

todo: Revamp final defense (entity upgrade for golem), it's too weak, reference here:

for(Creature zombie : new ArrayList<>(arena.getEnemies())) {

Slow 1 for every alive zombie for 0.25 seconds
Damage of 0.25 heart for every zombie alive

It is definitely too weak.

Plajer and others added 29 commits August 29, 2023 17:42
Killers will now split orbs for all people that assisted in the kill, any people that buffed the killer within 10 seconds or debuffed or attacked enemy that was killed
On wave refresh players are now partially healed (25% max health) and villagers are healed a bit as well
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

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.

2 participants