Skip to content

Commit

Permalink
v7.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Mazawrath authored May 19, 2023
2 parents 70b798c + 64df3a5 commit 78e18f2
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Overwatch-Genji-Dodgeball
**Current Version: v7.9.0**
**Deathmatch Code: C9RMM**
**Current Version: v7.9.1**
**Deathmatch Code: VYDBB**

Genji Dodgeball is a minigame inspired by the TF2 game pyro dodgeball.
When the ball is red it is targeting you! Use your deflect to target someone else. Look at the person you want to target next while deflecting. Use bouncepads to get extra air and style points.

## Team Deathmatch
**Team Deathmatch Code: YKCR7**
**Team Deathmatch Code: BZMVY**
The Team Deathmatch version is a version where passing is enabled by default. To pass, hold the Secondary Fire button. The ball with pass to another teammate or if none are alive, it will pass it to yourself. Each pass will cost 100 health, you can get healed by deflecting the ball to a enemy, or someone on either team dies.

## How to compile
Expand Down
61 changes: 53 additions & 8 deletions src/Genji-Dodgeball.opy
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

settings {
"main": {
"modeName": "<FG32CD32FF>Genji Dodgeball v7.9.0",
"description": "Genji Dodgeball v7.9.0. Developed by Mazawrath. Credit for others avaliable in GitHub repository https://github.com/Mazawrath/Overwatch-Genji-Dodgeball. Deflect the ball when it is red to target someone else! Use jump pads to get air!"
"modeName": "Genji Dodgeball v7.9.1",
"description": "Genji Dodgeball v7.9.1. Developed by Mazawrath. Credit for others avaliable in GitHub repository https://github.com/Mazawrath/Overwatch-Genji-Dodgeball. Deflect the ball when it is red to target someone else! Use jump pads to get air!"
},
"lobby": {
"allowPlayersInQueue": true,
Expand All @@ -19,8 +19,7 @@ settings {
"gamemodes": {
"ffa": {
"enabledMaps": [
"workshopIslandNight",
"workshopIsland"
"workshopIslandNight"
],
"gameLengthInMn": 15,
"enableSelfInitiatedRespawn": false
Expand Down Expand Up @@ -155,6 +154,7 @@ globalvar breakLength 89
globalvar stressTorbs 90
globalvar breakInProgress 91
globalvar spawnPoints 92
globalvar invisTeamsAntiCheat 93


#Player variables
Expand All @@ -179,6 +179,8 @@ playervar thirdPerson 17
playervar yeetPlayer 18
playervar latency 19
playervar latencyToggle 20
playervar emoteCheatCount 21
playervar stunCooldown 22


#Subroutine names
Expand Down Expand Up @@ -220,6 +222,7 @@ rule "// SETTINGS":
allowMatchEnd = createWorkshopSetting(bool, "Teams Settings", "Allow Match to End At Score", true, 0)
scoreToWin = createWorkshopSetting(int[1:30], "Teams Settings", "Score to Win", 10, 1)
passingAuraToggle = createWorkshopSetting(bool, "Teams Settings", "Passing Aura", true, 2)
invisTeamsAntiCheat = createWorkshopSetting(bool, "Teams Settings", "Invisible Players Anti-cheat", true, 3)
#Currently, there is an issue where the server will end, based on how many players there are. If there are less it will take longer to crash. But it WILL crash. This rule simply lets there be a "winner" at the end VS crashing in the middle of Final Duel.
gameEndEnabled = createWorkshopSetting(bool, "Teams Settings", "Allow Match to End At Time", false, 2)
watermarkEnabled = createWorkshopSetting(bool, "Visual Settings", "Watermark", true, 0)
Expand Down Expand Up @@ -321,7 +324,7 @@ rule "Disable Scoreboard":
rule "// Not enough players testing":
if not watermarkEnabled:
goto lbl_0
hudSubheader(getAllPlayers(), "Original by {0}. Version 7.9.0".format(name), HudPosition.LEFT, -1000, Color.AQUA, HudReeval.VISIBILITY, SpecVisibility.ALWAYS)
hudSubheader(getAllPlayers(), "Original by {0}. Version 7.9.1".format(name), HudPosition.LEFT, -1000, Color.AQUA, HudReeval.VISIBILITY, SpecVisibility.ALWAYS)
lbl_0:


Expand Down Expand Up @@ -480,10 +483,16 @@ rule "Player dashes too far out of bounds":
#Workshop Island Fix
#@Condition (getCurrentMap() != Map.WORKSHOP_ISLAND and getCurrentMap() != Map.WORKSHOP_ISLAND_NIGHT) == true

eventPlayer.setStatusEffect(null, Status.KNOCKED_DOWN, 2.5)
#eventPlayer.teleport(circleCenter + vect(random.randint(-15, 15), 8, random.randint(-15, 15)))
eventPlayer.applyImpulse(vect(directionTowards(eventPlayer.getPosition(), circleCenter).x, 0, directionTowards(eventPlayer.getPosition(), circleCenter).z), 20, Relativity.TO_WORLD, Impulse.CANCEL_CONTRARY_MOTION)
eventPlayer.applyImpulse(Vector.UP, 3, Relativity.TO_WORLD, Impulse.CANCEL_CONTRARY_MOTION)
if targetedPlayer.stunCooldown == 0:
eventPlayer.setStatusEffect(null, Status.KNOCKED_DOWN, 2.5)
targetedPlayer.stunCooldown = 0.5
else:
wait(0.5)
eventPlayer.setStatusEffect(null, Status.KNOCKED_DOWN, 2.5)
targetedPlayer.stunCooldown = 0.5
bigMessage(eventPlayer, "Do not dash out of the arena!")


Expand Down Expand Up @@ -856,7 +865,9 @@ rule "Ball reaches player":
else:
ballPlayer.setStatusEffect(null, Status.KNOCKED_DOWN, 0.5)
if targetedPlayer.isUsingAbility1():
targetedPlayer.setStatusEffect(null, Status.KNOCKED_DOWN, 1)
if targetedPlayer.stunCooldown == 0:
targetedPlayer.setStatusEffect(null, Status.KNOCKED_DOWN, 1)
targetedPlayer.stunCooldown = 0.5
targetedPlayer.teleport(ballPosition)
targetedPlayer.currentUltPercent += 5
playEffect(getAllPlayers(), DynamicEffect.EXPLOSION_SOUND, Color.WHITE, targetedPlayer.getPosition(), 200)
Expand Down Expand Up @@ -904,7 +915,9 @@ rule "Ball reaches player -TEAMS":
goto RULE_START
return
if targetedPlayer.isUsingAbility1():
targetedPlayer.setStatusEffect(null, Status.KNOCKED_DOWN, 1)
if targetedPlayer.stunCooldown == 0:
targetedPlayer.setStatusEffect(null, Status.KNOCKED_DOWN, 1)
targetedPlayer.stunCooldown = 0.5
targetedPlayer.teleport(ballPosition)
targetedPlayer.currentUltPercent += 5
playEffect(getAllPlayers(), DynamicEffect.EXPLOSION_SOUND, Color.WHITE, targetedPlayer.getPosition(), 200)
Expand Down Expand Up @@ -1581,3 +1594,35 @@ rule "Toggle Latency":
eventPlayer.latencyToggle = true
smallMessage(eventPlayer, "Lag compensation enabled for next round")
wait(0.5)

rule "No cheating during invisible players - TEAMS":
@Event eachPlayer
@Condition getCurrentGamemode() == Gamemode.TDM
@Condition invisTeamsAntiCheat
@Condition invisiblePlayers
@Condition roundInProgress
@Condition eventPlayer.isCommunicatingAnything()

eventPlayer.emoteCheatCount += 1
if eventPlayer.emoteCheatCount == 1:
smallMessage(eventPlayer, "Please don't cheat by emoting :(")
elif eventPlayer.emoteCheatCount == 2:
eventPlayer.setStatusEffect(null, Status.STUNNED, 1)
smallMessage(eventPlayer, "No cheating >:(")
waitUntil(eventPlayer.isAlive(), 9999)
wait(2.5)
smallMessage(eventPlayer, "Don't do it again or I get really mad")
elif eventPlayer.emoteCheatCount == 3:
eventPlayer.setStatusEffect(null, Status.ASLEEP, 5)
smallMessage(eventPlayer, "No cheating >:(")
waitUntil(eventPlayer.isAlive(), 9999)
wait(2.5)
smallMessage(eventPlayer, "One more time and I get super mad >:(")
else:
bigMessage(getAllPlayers(), "{0} keeps trying to cheat by emoting!".format(eventPlayer))
kill(eventPlayer, null)
if ballIsOut and eventPlayer == targetedPlayer:
ballDeleteRequested = true
waitUntil(eventPlayer.isAlive(), 9999)
wait(1.5)
smallMessage(eventPlayer, "What did I say?")
4 changes: 3 additions & 1 deletion src/Tournament.opy
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ rule "Get knocked down by yeeted Torb":
@Condition distance(eventPlayer, sorted([player for player in getPlayersOnHero(Hero.TORBJORN, Team.ALL) if player in stressTorbs and player.isAlive()], lambda player: distance(eventPlayer.getEyePosition(), player))[0].getPosition()) <= 1.5
@Condition sorted([player for player in getPlayersOnHero(Hero.TORBJORN, Team.ALL) if player in stressTorbs and player.isAlive()], lambda player: distance(eventPlayer.getEyePosition(), player))[0] != eventPlayer.yeetPlayer

eventPlayer.setStatusEffect(null, Status.KNOCKED_DOWN, 1.5)
if targetedPlayer.stunCooldown == 0:
eventPlayer.setStatusEffect(null, Status.KNOCKED_DOWN, 1.5)
targetedPlayer.stunCooldown = 0.5


# rule "Player leaves during tourney":
Expand Down
6 changes: 6 additions & 0 deletions src/init.opy
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ rule "Init player variables":
eventPlayer.toggleHUD = true
eventPlayer.dashNerf = false
eventPlayer.latencyToggle = false
eventPlayer.stunCooldown = 0
chase(eventPlayer.stunCooldown, 0, rate=1, ChaseReeval.NONE)
waitUntil((not roundInProgress or not isGameInProgress()) or eventPlayer.isAlive(), 9999)
eventPlayer.setInvisibility(Invis.NONE)
if invisiblePlayers:
Expand All @@ -55,6 +57,10 @@ rule "Init player variables":
if (perspectiveMode == 0):
wait(3)
smallMessage(eventPlayer, "Press {0} to toggle 1st/3rd person".format(buttonString(Button.RELOAD)))
if getCurrentGamemode() == Gamemode.TDM and invisiblePlayers and invisTeamsAntiCheat:
bigMessage(eventPlayer, "Invisible Players: No emoting!")
wait(3)
smallMessage(eventPlayer(), "Invisible players active: No emoting allowed! (This rule is enforced, be careful!)")


rule "Init global variables":
Expand Down

0 comments on commit 78e18f2

Please sign in to comment.