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

add amplify icon and support for scheme_amplify #266

Merged
merged 2 commits into from
Feb 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/AppBundle/Command/ImportStdCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,7 @@ protected function importObligationData(Card $card, $data)
'boost',
'boost_star',
'scheme_acceleration',
'scheme_amplify',
'scheme_crisis',
'scheme_hazard',
];
Expand Down Expand Up @@ -828,6 +829,7 @@ protected function importAllyData(Card $card, $data)
'attack_star',
'health_star',
'scheme_acceleration',
'scheme_amplify',
'scheme_hazard',
'thwart_cost',
'thwart_star',
Expand Down Expand Up @@ -860,6 +862,7 @@ protected function importEnvironmentData(Card $card, $data)
{
$optionalKeys = [
'scheme_acceleration',
'scheme_amplify',
'scheme_hazard',
];
foreach($optionalKeys as $key) {
Expand All @@ -878,6 +881,7 @@ protected function importSideSchemeData(Card $card, $data)
'escalation_threat_fixed',
'escalation_threat_star',
'scheme_acceleration',
'scheme_amplify',
Copy link
Contributor

Choose a reason for hiding this comment

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

I spent some effort making sure these keys are all alphabetical. Can you ensure they remain that way in this file? This looks to be out of order but if the name gets simplified to just amplify we should make sure all of these end up in the new correct order.

'scheme_crisis',
'scheme_hazard',
];
Expand All @@ -895,6 +899,7 @@ protected function importMainSchemeData(Card $card, $data)
'escalation_threat_fixed',
'escalation_threat_star',
'scheme_acceleration',
'scheme_amplify',
'scheme_crisis',
'scheme_hazard',
'stage',
Expand All @@ -919,6 +924,7 @@ protected function importPlayerSideSchemeData(Card $card, $data)
$optionalKeys = [
'base_threat_fixed',
'scheme_acceleration',
'scheme_amplify',
'scheme_crisis',
'scheme_hazard',
];
Expand Down Expand Up @@ -985,6 +991,7 @@ protected function importAttachmentData(Card $card, $data)
'boost_star',
'scheme',
'scheme_acceleration',
'scheme_amplify',
'scheme_crisis',
'scheme_hazard',
'scheme_star',
Expand Down
31 changes: 31 additions & 0 deletions src/AppBundle/Entity/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public function serialize() {
$optionalFields[] = 'resource_mental';
$optionalFields[] = 'resource_wild';
$optionalFields[] = 'scheme_acceleration';
$optionalFields[] = 'scheme_amplify';
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we also want to add this to the ally case below because those cards (https://marvelcdb.com/card/44016) use this new property too

Copy link
Author

Choose a reason for hiding this comment

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

I'm not sure adding "$optionalFields[] = 'scheme_amplify';" in Card.php is relevant
(although it is necessary in ImportStdCommand.php)

Lady Deadpool is well displayed in my local devenv as is:
image

$optionalFields[] = 'scheme_crisis';
$optionalFields[] = 'scheme_hazard';
case 'ally':
Expand Down Expand Up @@ -158,6 +159,7 @@ public function serialize() {
$optionalFields[] = 'escalation_threat_fixed';
$optionalFields[] = 'escalation_threat_star';
$optionalFields[] = 'scheme_acceleration';
$optionalFields[] = 'scheme_amplify';
$optionalFields[] = 'scheme_crisis';
$optionalFields[] = 'scheme_hazard';
break;
Expand Down Expand Up @@ -2560,6 +2562,11 @@ public function getThreatStar()
*/
private $schemeAcceleration;

/**
* @var integer
*/
private $schemeAmplify;

/**
* @var integer
*/
Expand Down Expand Up @@ -2614,6 +2621,30 @@ public function getSchemeAcceleration()
return $this->schemeAcceleration;
}

/**
* Set schemeAmplify
*
* @param integer $schemeAmplify
*
* @return Card
*/
public function setSchemeAmplify($schemeAmplify)
{
$this->schemeAmplify = $schemeAmplify;

return $this;
}

/**
* Get schemeAmplify
*
* @return integer
*/
public function getSchemeAmplify()
{
return $this->schemeAmplify;
}

/**
* Set schemeHazard
*
Expand Down
3 changes: 3 additions & 0 deletions src/AppBundle/Resources/config/doctrine/Card.orm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ AppBundle\Entity\Card:
schemeAcceleration:
type: smallint
nullable: true
schemeAmplify:
type: smallint
nullable: true
schemeHazard:
type: smallint
nullable: true
Expand Down
70 changes: 21 additions & 49 deletions src/AppBundle/Resources/public/css/icons.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
@font-face {
font-family: 'marvel-icons';
src: url('../fonts/marvel-icons.eot?4fzpq9');
src: url('../fonts/marvel-icons.eot?4fzpq9#iefix') format('embedded-opentype'),
url('../fonts/marvel-icons.ttf?4fzpq9') format('truetype'),
url('../fonts/marvel-icons.woff?4fzpq9') format('woff'),
url('../fonts/marvel-icons.svg?4fzpq9#marvel-icons') format('svg');
Comment on lines -3 to -7
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know enough about these type of font files but if we delete these files here, they are orphaned in the repo and should probably get deleted.

I am curious though why we needed them in the first place (or if we still need them and shouldn't delete them) since this new ttf format matches the existing marvel-icons.ttf format and we still used eot, woof, and svg files before. Again, not a font file expert so I'm unfamiliar with the nuances of those types of files.


src: url('../fonts/ChampionsIcons.ttf?') format('truetype');
Copy link
Contributor

Choose a reason for hiding this comment

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

I would think if we have a new icon that needs to get added we would replace the existing marvel-icons.ttf with this new file instead of creating a new file with a new name.

Copy link
Author

Choose a reason for hiding this comment

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

I kept the exact name of the file from the homebrew server in case it is updated
Also changing the name of the file might help to force the upload if the previous file is in some cache


font-weight: normal;
font-style: normal;
}
Expand Down Expand Up @@ -55,76 +53,50 @@
font-size: 32px;
}
.icon-crisis:before {
content: "\e900";
content: "C";
}
.icon-acceleration {
font-size: 32px;
}
.icon-acceleration:before {
content: "\e901";
content: "A";
}
.icon-amplify {
font-size: 32px;
}
.icon-amplify:before {
content: "F";
}
.icon-hazard {
font-size: 32px;
}
.icon-hazard:before {
content: "\e902";
content: "H";
}
.icon-per_hero:before {
content: "\e903";
content: "G";
}
.icon-unique:before {
content: "\e904";
content: "U";
}
.icon-star:before {
content: "\e905";
content: "S";
}
.icon-boost:before {
content: "\e906";
content: "B";
}
.icon-cost:before {
content: "\e907";
}
.icon-energy_fill:before {
content: "\e908";
color: #86671b;
}
.icon-energy_outline:before {
content: "\e909";
color: #f6be33;
content: "D";
}
.icon-energy:before {
content: "\e90a";
}
.icon-mental_fill:before {
content: "\e90b";
color: #b7c9eb;
}
.icon-mental_outline:before {
content: "\e90c";
color: #5c72c1;
content: "E";
}
.icon-mental:before {
content: "\e90d";
}
.icon-physical_fill:before {
content: "\e90e";
color: #ee9080;
}
.icon-physical_outline:before {
content: "\e90f";
color: #aa3220;
content: "M";
}
.icon-physical:before {
content: "\e910";
}
.icon-wild_fill:before {
content: "\e911";
color: #45bc5c;
}
.icon-wild_outline:before {
content: "\e912";
color: #247034;
content: "P";
}
.icon-wild:before {
content: "\e913";
content: "W";
}
Binary file not shown.
Binary file not shown.
Loading