Wonder Guard in HCC

Discussion in 'Implemented' started by Joeypals!!, Sep 22, 2015.

  1. Joeypals!!

    Joeypals!! Don't you worry 'bout a thing~

    Joined:
    Dec 30, 2011
    Messages:
    2,173
    Likes Received:
    557
    PO Trainer Name:
    Joeypals
    I know this was pushed around the time HCC was introduced, but it still hasn't been done (as I saw in a recent match against the luckiest SOB to ever exist Diamondslight). I was wondering when/if it'd be possible to code out Wonder Guard from Hackmons Challenge Cup. I get that the tier is "expect the unexpected", but when matches can be decided just because of a Pokemon with Wonder Guard, it's flat-out ridiculous in my opinion. As such, I am motioning to remove it.
     
  2. fitzy

    fitzy Heart of the cards Forum Moderator Forum Moderator

    Joined:
    Apr 16, 2012
    Messages:
    883
    Likes Received:
    296
    Getting Wonderguard is the same chance of a shiny. If you get it then you deserve the win that it probably brings.
     
    Oh So Penspin likes this.
  3. Fuzzysqurl

    Fuzzysqurl baa baa mareep I do what I want Server Owner Developer I do what I want Server Owner Developer

    Joined:
    Sep 12, 2012
    Messages:
    2,096
    Likes Received:
    967
    It was never implemented to be that way. It was being discussed but no one actually coded it.

    Code (text):
    1.  if (gen >= GEN_MIN_ABILITIES) {
    2.   if (illegal) {
    3.   p.ability() = true_rand()%(AbilityInfo::NumberOfAbilities(gen) - 1) + 1;
    4.   }
    I could code it, but otherwise you still have the 1/192ish chance to get it.
     
    Last edited: Sep 23, 2015
  4. Fuzzysqurl

    Fuzzysqurl baa baa mareep I do what I want Server Owner Developer I do what I want Server Owner Developer

    Joined:
    Sep 12, 2012
    Messages:
    2,096
    Likes Received:
    967
    I coded it. And merged it. Fite me if you have any problems.
     
    Joeypals!! likes this.
  5. pokeboss9

    pokeboss9 Member

    Joined:
    Jun 28, 2011
    Messages:
    83
    Likes Received:
    6
    Standart Hackmons is full of Wonderguard, HCC should atleast represent a tiny portion of it.

    Otherwisewise name it BHCC (BalancedHackmonsChallengeCup).

    Hackmons was created in Gen4 based of Wondertomb/Wondereye, cutting out Wonderguard
    is blasphemy.
     
    Last edited: Oct 10, 2015
  6. MidwayMarshall

    MidwayMarshall woof Forum Moderator Developer Forum Moderator Developer

    Joined:
    Jun 13, 2014
    Messages:
    303
    Likes Received:
    170
    Challenge Cup is random, if it's choices were based on a tier's usages then wouldn't it be named Battle Factory 6v6 Hackmons?
     
  7. pokeboss9

    pokeboss9 Member

    Joined:
    Jun 28, 2011
    Messages:
    83
    Likes Received:
    6
    So why even bother to remove 1 random element out of 192 ablilites, ~600 moves and 721 pokes ?
     
  8. Fuzzysqurl

    Fuzzysqurl baa baa mareep I do what I want Server Owner Developer I do what I want Server Owner Developer

    Joined:
    Sep 12, 2012
    Messages:
    2,096
    Likes Received:
    967
    Challenge cup was never completely random, just so you know. There are many behind the scenes tweaks to make it a more enjoyable tier to play.
     
  9. pokeboss9

    pokeboss9 Member

    Joined:
    Jun 28, 2011
    Messages:
    83
    Likes Received:
    6
    Can you post those "tweaks" ?

    I remember the first Challenge Cup in Pokemon stadium not being completly random aswell.
     
  10. Fuzzysqurl

    Fuzzysqurl baa baa mareep I do what I want Server Owner Developer I do what I want Server Owner Developer

    Joined:
    Sep 12, 2012
    Messages:
    2,096
    Likes Received:
    967
    Not sure if Level Balancing counts, but there's 1.

    Then there's a bunch of things regarding moves (such as if you have Return, you have 255 Happiness automatically) and then it tries to get you a move you can kill the opponent with, but after a certain number of failed generations it just gives you the next moveset generated (at least, that's what i interpret this as)
    Code (text):
    1.  
    2. for (int i = 0; i < 4; i++) {
    3.   /* If there are no other moves possible,
    4.   sets the remaining moves to 0 and exit the loop
    5.   (like for weedle) */
    6.   if (moves.size() <= i) {
    7.   for (int j = i; j < 4; j++) {
    8.   p.move(j).num() = 0;
    9.   p.move(j).load(gen);
    10.   }
    11.   break;
    12.   }
    13.   int count = 0;
    14.   while(++count) {
    15.   int movenum = moves[true_rand()%moves.size()];
    16.   if (movesTaken.contains(movenum)) {
    17.   continue;
    18.   }
    19.   if (MoveInfo::Power(movenum, gen) > 0 && movenum != Move::NaturalGift && movenum != Move::Snore && movenum != Move::Fling
    20.   && !MoveInfo::isOHKO(movenum, gen) && movenum != Move::DreamEater && movenum != Move::Synchronoise && movenum != Move::HoldBack
    21.   && movenum != Move::FalseSwipe && movenum != Move::Feint) {
    22.   if (count > 4 || MoveInfo::Power(movenum, gen) > 50) {
    23.   off++;
    24.   }
    25.   }
    26.   if (i == 3 && ((count <= 6 && off < 2) || (count > 6 && count < 10 && off == 0))) {
    27.   continue;
    28.   }
    29.   movesTaken.push_back(movenum);
    30.   p.move(i).num() = movenum;
    31.   p.move(i).load(gen);
    32.   break;
    33.   }
    34.   }
    35.  
    36.   if (movesTaken.contains(Move::Return))
    37.   p.happiness() = 255;
    38.   else if (movesTaken.contains(Move::Frustration))
    39.   p.happiness() = 0;
    40.