Update Discord trade listings
This commit is contained in:
+3
-3
@@ -20,8 +20,8 @@ ambiguous wording and overlapping variants are rejected. To use another input
|
|||||||
file, pass `--completed-trades path/to/file.csv`. The checked-in file has only
|
file, pass `--completed-trades path/to/file.csv`. The checked-in file has only
|
||||||
a header until real completed trades are recorded.
|
a header until real completed trades are recorded.
|
||||||
|
|
||||||
The current snapshot contains 1,287 listings. The parser found 17 simple quotes
|
The current snapshot contains 1,287 listings. The parser found 18 simple quotes
|
||||||
and 21 bundle quotes, and no completed trades have been entered. Thirty-two
|
and 23 bundle quotes, and no completed trades have been entered. Thirty-five
|
||||||
asking quotes connect 37 variants to Aizen Evo. Six
|
asking quotes connect 37 variants to Aizen Evo. Six
|
||||||
eligible estimates are marked `unstable` and unranked. Aizen Evo, Shiny Homura
|
eligible estimates are marked `unstable` and unranked. Aizen Evo, Shiny Homura
|
||||||
Evo, and Shiny Dark Mage Evo have numeric entries. The conflict report finds
|
Evo, and Shiny Dark Mage Evo have numeric entries. The conflict report finds
|
||||||
@@ -91,6 +91,6 @@ more completed trades with provenance and exact quantities, evolution state,
|
|||||||
shiny state, stat quality, and date, then fit the model again.
|
shiny state, stat quality, and date, then fit the model again.
|
||||||
|
|
||||||
`interest_index.csv`, generated by `py -B calculate_interest_index.py`, is a
|
`interest_index.csv`, generated by `py -B calculate_interest_index.py`, is a
|
||||||
separate demand-versus-supply report. The current report covers 29 variants
|
separate demand-versus-supply report. The current report covers 30 variants
|
||||||
from 1,200 distinct authors. In explicit `my X for Y` proposals, X counts as
|
from 1,200 distinct authors. In explicit `my X for Y` proposals, X counts as
|
||||||
offered and Y as requested. It must not be read as a value ranking.
|
offered and Y as requested. It must not be read as a value ranking.
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
52,explicit_for,"{""Android 21 Evo"": 1, ""Alucard Evo"": 1}","{""Shiny Homura Evo"": 1}",MY Android 21 Evo + Alucard Evo FOR Shiny Homura Evo
|
52,explicit_for,"{""Android 21 Evo"": 1, ""Alucard Evo"": 1}","{""Shiny Homura Evo"": 1}",MY Android 21 Evo + Alucard Evo FOR Shiny Homura Evo
|
||||||
174,explicit_for,"{""Shiny Boros Evo"": 1, ""Shiny Gilgamesh Evo"": 1, ""Shiny Mamy Evo"": 2}","{""Shiny Homura Evo"": 1}","Shiny Homura Evo FOR Shiny Boros Evo, Shiny Gilgamesh Evo, 2x Shiny Mamy Evo"
|
174,explicit_for,"{""Shiny Boros Evo"": 1, ""Shiny Gilgamesh Evo"": 1, ""Shiny Mamy Evo"": 2}","{""Shiny Homura Evo"": 1}","Shiny Homura Evo FOR Shiny Boros Evo, Shiny Gilgamesh Evo, 2x Shiny Mamy Evo"
|
||||||
174,explicit_for,"{""Shiny Boros Evo"": 1, ""Shiny Gilgamesh Evo"": 1}","{""Shiny Emilia Evo"": 1}",Shiny Emilia Evo FOR Shiny Boros Evo AND Shiny Gilgamesh Evo
|
174,explicit_for,"{""Shiny Boros Evo"": 1, ""Shiny Gilgamesh Evo"": 1}","{""Shiny Emilia Evo"": 1}",Shiny Emilia Evo FOR Shiny Boros Evo AND Shiny Gilgamesh Evo
|
||||||
|
253,explicit_for,"{""Shiny Dark Mage Evo"": 1, ""Buddha Evo"": 1}","{""Homura Evo"": 1}",my Shiny Dark Mage Evo + Buddha Evo for Homura Evo
|
||||||
366,explicit_for,"{""Aizen Evo"": 1, ""Homura Evo"": 1}","{""Thorfinn Evo"": 1}",My Aizen Evo and Homura Evo for Thorfinn Evo
|
366,explicit_for,"{""Aizen Evo"": 1, ""Homura Evo"": 1}","{""Thorfinn Evo"": 1}",My Aizen Evo and Homura Evo for Thorfinn Evo
|
||||||
377,explicit_for,"{""Shiny Poseidon Evo"": 1, ""Dark Mage Evo"": 1, ""Chuuni Evo"": 2}","{""Homura Evo"": 1}","My Shiny Poseidon Evo, 1 Dark Mage Evo, 2x Chuuni Evo for Homura Evo"
|
377,explicit_for,"{""Shiny Poseidon Evo"": 1, ""Dark Mage Evo"": 1, ""Chuuni Evo"": 2}","{""Homura Evo"": 1}","My Shiny Poseidon Evo, 1 Dark Mage Evo, 2x Chuuni Evo for Homura Evo"
|
||||||
397,explicit_for,"{""Alucard Evo"": 1, ""Shiny Ice Queen Evo"": 1}","{""Aizen Evo"": 1}",MY Alucard Evo AND Shiny ICE QUEEN Evo FOR Aizen Evo
|
397,explicit_for,"{""Alucard Evo"": 1, ""Shiny Ice Queen Evo"": 1}","{""Aizen Evo"": 1}",MY Alucard Evo AND Shiny ICE QUEEN Evo FOR Aizen Evo
|
||||||
@@ -17,6 +18,7 @@
|
|||||||
1101,listing_pair,"{""Chuuni Evo"": 1, ""Cream Evo"": 1}","{""Dark Mage Evo"": 1}",Chuuni Evo AND Cream Evo -> Dark Mage Evo
|
1101,listing_pair,"{""Chuuni Evo"": 1, ""Cream Evo"": 1}","{""Dark Mage Evo"": 1}",Chuuni Evo AND Cream Evo -> Dark Mage Evo
|
||||||
1138,explicit_for,"{""Aizen Evo"": 1, ""Shiny Power Evo"": 1}","{""Shiny Homura Evo"": 1}",my Aizen Evo and Shiny power Evo for Shiny Homura Evo
|
1138,explicit_for,"{""Aizen Evo"": 1, ""Shiny Power Evo"": 1}","{""Shiny Homura Evo"": 1}",my Aizen Evo and Shiny power Evo for Shiny Homura Evo
|
||||||
1195,explicit_for,"{""Shiny Yoshina Evo"": 1, ""Chuuni Evo"": 1, ""Buddha Evo"": 1, ""Kisuke Evo"": 1}","{""Homura Evo"": 1}",Homura Evo for my Shiny Yoshina Evo+Chuuni Evo+Buddha Evo+kisuke Evo
|
1195,explicit_for,"{""Shiny Yoshina Evo"": 1, ""Chuuni Evo"": 1, ""Buddha Evo"": 1, ""Kisuke Evo"": 1}","{""Homura Evo"": 1}",Homura Evo for my Shiny Yoshina Evo+Chuuni Evo+Buddha Evo+kisuke Evo
|
||||||
|
1195,explicit_for,"{""Shiny Yoshina Evo"": 1, ""Chuuni Evo"": 1}","{""Shiny Dark Mage Evo"": 1}",Shiny Dark Mage Evo for my Shiny Yoshina Evo and Chuuni Evo
|
||||||
1232,listing_pair,"{""Shiny Deer Tan Evo"": 1, ""Deer Tan Evo"": 1}","{""Shiny Idol Evo"": 1}",Shiny Deer Tan Evo and Deer Tan Evo -> Shiny idol Evo
|
1232,listing_pair,"{""Shiny Deer Tan Evo"": 1, ""Deer Tan Evo"": 1}","{""Shiny Idol Evo"": 1}",Shiny Deer Tan Evo and Deer Tan Evo -> Shiny idol Evo
|
||||||
1256,listing_pair,"{""Cid Evo"": 1, ""Poseidon Evo"": 1}","{""Dark Mage Evo"": 1}",Cid Evo and Poseidon Evo -> Dark Mage Evo
|
1256,listing_pair,"{""Cid Evo"": 1, ""Poseidon Evo"": 1}","{""Dark Mage Evo"": 1}",Cid Evo and Poseidon Evo -> Dark Mage Evo
|
||||||
1265,explicit_for,"{""Cid Evo"": 1, ""Skull Knight Evo"": 1, ""Dark Mage Evo"": 3}","{""Homura Evo"": 1}","Cid Evo,Skull Knight Evo, 3 Dark Mage Evo FOR Homura Evo"
|
1265,explicit_for,"{""Cid Evo"": 1, ""Skull Knight Evo"": 1, ""Dark Mage Evo"": 3}","{""Homura Evo"": 1}","Cid Evo,Skull Knight Evo, 3 Dark Mage Evo FOR Homura Evo"
|
||||||
|
|||||||
|
+36
-36
@@ -1,38 +1,38 @@
|
|||||||
unit_variant,quote_count,asking_quote_count,completed_trade_count,full_fit_value,leave_one_out_min,leave_one_out_max,max_change_pct,most_influential_source_row,most_influential_evidence_type,most_influential_quote,disconnects_when_removed,status,conflicting_source_rows
|
unit_variant,quote_count,asking_quote_count,completed_trade_count,full_fit_value,leave_one_out_min,leave_one_out_max,max_change_pct,most_influential_source_row,most_influential_evidence_type,most_influential_quote,disconnects_when_removed,status,conflicting_source_rows
|
||||||
Aizen Evo,9,9,0,1000.0,1000.0,1000.0,0.0,,,,,reference,
|
Aizen Evo,9,9,0,1000.0,1000.0,1000.0,0.0,,,,,reference,
|
||||||
Alucard Evo,5,5,0,848.2,502.5,983.9,40.8,6,asking_direct,MY Alucard Evo FOR Aizen Evo,,unstable,187 | 947
|
Alucard Evo,5,5,0,861.6,584.1,998.6,32.2,6,asking_direct,MY Alucard Evo FOR Aizen Evo,,unstable,187 | 947
|
||||||
Android 21 Evo,1,1,0,899.0,780.6,1106.5,23.1,6,asking_direct,MY Alucard Evo FOR Aizen Evo,52,insufficient,
|
Android 21 Evo,1,1,0,908.0,774.7,1081.1,19.1,6,asking_direct,MY Alucard Evo FOR Aizen Evo,52,insufficient,
|
||||||
Buddha Evo,3,3,0,245.5,14.5,617.9,151.6,800,asking_bundle,2 Homura Evo+Buddha Evo -> Aizen Evo,,unstable,
|
Buddha Evo,5,5,0,87.1,31.2,125.5,64.2,750,asking_direct,Chuuni Evo -> Dark Mage Evo,,unstable,
|
||||||
Chuuni Evo,6,6,0,66.6,1.0,103.1,98.5,750,asking_direct,Chuuni Evo -> Dark Mage Evo,,unstable,
|
Chuuni Evo,7,7,0,78.1,7.7,98.3,90.2,750,asking_direct,Chuuni Evo -> Dark Mage Evo,,unstable,
|
||||||
Cid Evo,2,2,0,283.4,1.0,460.9,99.6,636,asking_bundle,2 Poseidon Evo AND Nami Evo -> Dark Mage Evo,,insufficient,
|
Cid Evo,2,2,0,286.0,1.0,460.4,99.7,636,asking_bundle,2 Poseidon Evo AND Nami Evo -> Dark Mage Evo,,insufficient,
|
||||||
Cid Unevo,1,1,0,62.9,1.0,69.2,98.4,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,463,insufficient,
|
Cid Unevo,1,1,0,63.0,1.0,69.2,98.4,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,463,insufficient,
|
||||||
Cream Evo,1,1,0,248.4,232.2,406.5,63.7,750,asking_direct,Chuuni Evo -> Dark Mage Evo,1101,insufficient,
|
Cream Evo,1,1,0,238.8,227.6,298.0,24.8,750,asking_direct,Chuuni Evo -> Dark Mage Evo,1101,insufficient,
|
||||||
Dark Mage Evo,12,12,0,112.1,80.8,146.3,30.5,187,asking_direct,2 Homura Evo FOR Alucard Evo,,unstable,
|
Dark Mage Evo,12,12,0,111.4,86.9,142.9,28.3,187,asking_direct,2 Homura Evo FOR Alucard Evo,,unstable,
|
||||||
Gilgamesh Evo,1,1,0,1.0,1.0,384.3,38328.0,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,742,insufficient,
|
Gilgamesh Evo,1,1,0,1.0,1.0,393.9,39287.5,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,742,insufficient,
|
||||||
Gilgamesh Unevo,1,1,0,274.6,92.3,632.6,130.4,800,asking_bundle,2 Homura Evo+Buddha Evo -> Aizen Evo,115,insufficient,
|
Gilgamesh Unevo,1,1,0,122.2,68.5,159.2,44.0,750,asking_direct,Chuuni Evo -> Dark Mage Evo,115,insufficient,
|
||||||
Homura Evo,14,14,0,581.3,379.8,797.7,37.2,187,asking_direct,2 Homura Evo FOR Alucard Evo,,unstable,187 | 947
|
Homura Evo,15,15,0,599.0,445.9,794.5,32.6,187,asking_direct,2 Homura Evo FOR Alucard Evo,,unstable,187 | 947
|
||||||
Jelly Evo,1,1,0,531.5,485.5,534.6,8.6,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,463,insufficient,
|
Jelly Evo,1,1,0,531.5,486.0,534.6,8.6,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,463,insufficient,
|
||||||
Kisuke Evo,1,1,0,370.6,245.3,504.9,36.3,187,asking_direct,2 Homura Evo FOR Alucard Evo,1195,insufficient,
|
Kisuke Evo,1,1,0,389.8,349.9,438.6,12.5,187,asking_direct,2 Homura Evo FOR Alucard Evo,1195,insufficient,
|
||||||
Nagumo Unevo,1,1,0,62.9,1.0,69.2,98.4,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,463,insufficient,
|
Nagumo Unevo,1,1,0,63.0,1.0,69.2,98.4,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,463,insufficient,
|
||||||
Nami Evo,1,1,0,552.3,472.8,670.8,21.5,1265,asking_bundle,"Cid Evo,Skull Knight Evo, 3 Dark Mage Evo FOR Homura Evo",636,insufficient,
|
Nami Evo,1,1,0,554.3,472.7,670.8,21.0,1265,asking_bundle,"Cid Evo,Skull Knight Evo, 3 Dark Mage Evo FOR Homura Evo",636,insufficient,
|
||||||
Poseidon Evo,2,2,0,1.0,1.0,324.2,32319.4,636,asking_bundle,2 Poseidon Evo AND Nami Evo -> Dark Mage Evo,,insufficient,
|
Poseidon Evo,2,2,0,1.0,1.0,320.4,31938.9,636,asking_bundle,2 Poseidon Evo AND Nami Evo -> Dark Mage Evo,,insufficient,
|
||||||
Roger Evo,1,1,0,542.3,371.9,700.9,31.4,187,asking_direct,2 Homura Evo FOR Alucard Evo,712,insufficient,
|
Roger Evo,1,1,0,528.3,374.4,648.9,29.1,187,asking_direct,2 Homura Evo FOR Alucard Evo,712,insufficient,
|
||||||
Shiny Boros Evo,1,1,0,242.9,205.1,584.2,140.5,52,asking_direct,MY Shiny Gilgamesh Evo FOR THORFINN Evo,,insufficient,
|
Shiny Boros Evo,1,1,0,210.9,189.1,570.3,170.4,52,asking_direct,MY Shiny Gilgamesh Evo FOR THORFINN Evo,,insufficient,
|
||||||
Shiny Buddha Evo,1,1,0,722.8,537.7,921.9,27.5,187,asking_direct,2 Homura Evo FOR Alucard Evo,536,insufficient,
|
Shiny Buddha Evo,1,1,0,745.8,614.8,912.8,22.4,187,asking_direct,2 Homura Evo FOR Alucard Evo,536,insufficient,
|
||||||
Shiny Chuuni Evo,4,4,0,946.5,353.1,987.1,62.7,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,,unstable,
|
Shiny Chuuni Evo,4,4,0,947.0,359.6,987.1,62.0,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,,unstable,
|
||||||
Shiny Dark Mage Evo,2,2,0,697.5,534.7,836.3,23.3,174,asking_bundle,"Shiny Homura Evo FOR Shiny Boros Evo, Shiny Gilgamesh Evo, 2x Shiny Mamy Evo",,ranked,
|
Shiny Dark Mage Evo,4,4,0,609.9,516.7,735.6,20.6,187,asking_direct,2 Homura Evo FOR Alucard Evo,,ranked,
|
||||||
Shiny Elf Mage Evo,1,1,0,215.1,198.8,454.4,111.2,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,47,insufficient,
|
Shiny Elf Mage Evo,1,1,0,214.9,198.8,451.8,110.2,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,47,insufficient,
|
||||||
Shiny Emilia Evo,1,1,0,1358.8,1132.6,1550.9,16.6,52,asking_direct,MY Shiny Gilgamesh Evo FOR THORFINN Evo,174,insufficient,
|
Shiny Emilia Evo,1,1,0,1337.3,1110.7,1554.6,16.9,52,asking_direct,MY Shiny Gilgamesh Evo FOR THORFINN Evo,174,insufficient,
|
||||||
Shiny Gilgamesh Evo,2,2,0,1212.8,584.2,1341.1,51.8,52,asking_direct,MY Shiny Gilgamesh Evo FOR THORFINN Evo,,insufficient,
|
Shiny Gilgamesh Evo,2,2,0,1217.4,570.3,1335.9,53.2,52,asking_direct,MY Shiny Gilgamesh Evo FOR THORFINN Evo,,insufficient,
|
||||||
Shiny Homura Evo,3,3,0,1719.9,1563.3,1765.0,9.1,174,asking_bundle,"Shiny Homura Evo FOR Shiny Boros Evo, Shiny Gilgamesh Evo, 2x Shiny Mamy Evo",,ranked,
|
Shiny Homura Evo,3,3,0,1744.8,1566.6,1790.9,10.2,174,asking_bundle,"Shiny Homura Evo FOR Shiny Boros Evo, Shiny Gilgamesh Evo, 2x Shiny Mamy Evo",,ranked,
|
||||||
Shiny Ice Queen Evo,1,1,0,332.1,225.3,604.4,82.0,6,asking_direct,MY Alucard Evo FOR Aizen Evo,397,insufficient,
|
Shiny Ice Queen Evo,1,1,0,321.6,213.7,540.1,68.0,6,asking_direct,MY Alucard Evo FOR Aizen Evo,397,insufficient,
|
||||||
Shiny Killstreak Evo,1,1,0,146.2,116.1,179.2,22.5,187,asking_direct,2 Homura Evo FOR Alucard Evo,490,insufficient,
|
Shiny Killstreak Evo,1,1,0,145.6,122.0,175.9,20.8,187,asking_direct,2 Homura Evo FOR Alucard Evo,490,insufficient,
|
||||||
Shiny Mamy Evo,2,2,0,281.5,196.0,579.0,105.7,174,asking_bundle,"Shiny Homura Evo FOR Shiny Boros Evo, Shiny Gilgamesh Evo, 2x Shiny Mamy Evo",,insufficient,
|
Shiny Mamy Evo,2,2,0,327.7,251.8,592.9,81.0,174,asking_bundle,"Shiny Homura Evo FOR Shiny Boros Evo, Shiny Gilgamesh Evo, 2x Shiny Mamy Evo",,insufficient,
|
||||||
Shiny Piccolo Evo,1,1,0,215.1,198.8,454.4,111.2,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,47,insufficient,
|
Shiny Piccolo Evo,1,1,0,214.9,198.8,451.8,110.2,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,47,insufficient,
|
||||||
Shiny Poseidon Evo,2,2,0,517.1,442.1,798.0,54.3,750,asking_direct,Chuuni Evo -> Dark Mage Evo,,insufficient,
|
Shiny Poseidon Evo,2,2,0,513.7,439.4,615.7,19.8,750,asking_direct,Chuuni Evo -> Dark Mage Evo,,insufficient,
|
||||||
Shiny Power Evo,1,1,0,779.4,656.1,814.9,15.8,174,asking_bundle,"Shiny Homura Evo FOR Shiny Boros Evo, Shiny Gilgamesh Evo, 2x Shiny Mamy Evo",1138,insufficient,
|
Shiny Power Evo,1,1,0,799.0,658.7,835.3,17.6,174,asking_bundle,"Shiny Homura Evo FOR Shiny Boros Evo, Shiny Gilgamesh Evo, 2x Shiny Mamy Evo",1138,insufficient,
|
||||||
Shiny Sakamoto Evo,1,1,0,531.5,485.5,534.6,8.6,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,463,insufficient,
|
Shiny Sakamoto Evo,1,1,0,531.5,486.0,534.6,8.6,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,463,insufficient,
|
||||||
Shiny Somber Evo,1,1,0,531.5,485.5,534.6,8.6,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,463,insufficient,
|
Shiny Somber Evo,1,1,0,531.5,486.0,534.6,8.6,228,asking_direct,Shiny Chuuni Evo for Aizen Evo,463,insufficient,
|
||||||
Shiny Yoshina Evo,1,1,0,370.6,245.3,504.9,36.3,187,asking_direct,2 Homura Evo FOR Alucard Evo,1195,insufficient,
|
Shiny Yoshina Evo,1,1,0,501.6,430.2,651.0,29.8,1195,asking_bundle,Homura Evo for my Shiny Yoshina Evo+Chuuni Evo+Buddha Evo+kisuke Evo,,insufficient,
|
||||||
Skull Knight Evo,1,1,0,500.8,431.6,647.6,29.3,636,asking_bundle,2 Poseidon Evo AND Nami Evo -> Dark Mage Evo,1265,insufficient,
|
Skull Knight Evo,1,1,0,509.0,437.9,655.5,28.8,636,asking_bundle,2 Poseidon Evo AND Nami Evo -> Dark Mage Evo,1265,insufficient,
|
||||||
Thorfinn Evo,2,2,0,1251.6,754.7,1469.1,39.7,366,asking_bundle,My Aizen Evo and Homura Evo for Thorfinn Evo,,insufficient,
|
Thorfinn Evo,2,2,0,1257.7,746.0,1481.5,40.7,366,asking_bundle,My Aizen Evo and Homura Evo for Thorfinn Evo,,insufficient,
|
||||||
|
|||||||
|
+182
-8
@@ -74,6 +74,7 @@ UNIT_NAME_RULES = tuple(
|
|||||||
for pattern, canonical in (
|
for pattern, canonical in (
|
||||||
(r"\bSHINNY\b", "Shiny"),
|
(r"\bSHINNY\b", "Shiny"),
|
||||||
(r"\bFRIREN\b", "Frieren"),
|
(r"\bFRIREN\b", "Frieren"),
|
||||||
|
(r"\bFREIREN\b", "Elf Mage"),
|
||||||
(r"\bUMBRA\b", "Cid"),
|
(r"\bUMBRA\b", "Cid"),
|
||||||
(r"\bZABUZA\b", "Mist Ninja"),
|
(r"\bZABUZA\b", "Mist Ninja"),
|
||||||
(r"\bDAZAI\b", "Inhuman"),
|
(r"\bDAZAI\b", "Inhuman"),
|
||||||
@@ -106,12 +107,15 @@ UNIT_NAME_RULES = tuple(
|
|||||||
(r"\bHEATHCLIFF\b", "Heathcliff"),
|
(r"\bHEATHCLIFF\b", "Heathcliff"),
|
||||||
(r"\bBLACK\s*DOG\b", "Black Dog"),
|
(r"\bBLACK\s*DOG\b", "Black Dog"),
|
||||||
(r"\bSEA\s+GOD\b", "Poseidon"),
|
(r"\bSEA\s+GOD\b", "Poseidon"),
|
||||||
|
(r"\bSEAGOD\b", "Poseidon"),
|
||||||
(r"\b(?:ENLIGHTENED|ENLIGTHENED|ELIGHTEND)\b", "Buddha"),
|
(r"\b(?:ENLIGHTENED|ENLIGTHENED|ELIGHTEND)\b", "Buddha"),
|
||||||
|
(r"\bENLIGHTENET\b", "Buddha"),
|
||||||
(r"\bGOLDEN\s+KING\b", "Gilgamesh"),
|
(r"\bGOLDEN\s+KING\b", "Gilgamesh"),
|
||||||
(r"\bDRACULA\b", "Alucard"),
|
(r"\bDRACULA\b", "Alucard"),
|
||||||
(r"\bVIKING\b", "Thorfinn"),
|
(r"\bVIKING\b", "Thorfinn"),
|
||||||
(r"\bSHADOWGIRL\b", "Homura"),
|
(r"\bSHADOWGIRL\b", "Homura"),
|
||||||
(r"\bLEGENDARY\s+ASSASSIN\b", "Sakamoto"),
|
(r"\bLEGENDARY\s+ASSASSIN\b", "Sakamoto"),
|
||||||
|
(r"\bLEGENDARY\s+ASSASIN\b", "Sakamoto"),
|
||||||
(r"\bPRIME\s+ASSASSIN\b", "Sakamoto"),
|
(r"\bPRIME\s+ASSASSIN\b", "Sakamoto"),
|
||||||
(r"\bSK\s*/\s*SKULL\s*/\s*SKELETON\s+KNIGHT\b", "Skull Knight"),
|
(r"\bSK\s*/\s*SKULL\s*/\s*SKELETON\s+KNIGHT\b", "Skull Knight"),
|
||||||
(r"\bSHINY\s+SK\b", "Shiny Skull Knight"),
|
(r"\bSHINY\s+SK\b", "Shiny Skull Knight"),
|
||||||
@@ -127,29 +131,74 @@ UNIT_NAME_RULES = tuple(
|
|||||||
(r"\bVENG(?:E)?FULL?\b(?!\s+SWORD)", "Vengeful Swordsman"),
|
(r"\bVENG(?:E)?FULL?\b(?!\s+SWORD)", "Vengeful Swordsman"),
|
||||||
(r"\b(?:FRIEND|FIEND)\s+GIRL\b", "Fiend Girl"),
|
(r"\b(?:FRIEND|FIEND)\s+GIRL\b", "Fiend Girl"),
|
||||||
(r"\bSKULL\s*(?:NIGHT|KNIGHT)\b", "Skull Knight"),
|
(r"\bSKULL\s*(?:NIGHT|KNIGHT)\b", "Skull Knight"),
|
||||||
|
(r"\bSKELETON\s+KNIGHT\b", "Skull Knight"),
|
||||||
(r"\bSWITCH\s*BLADES?\b", "Nagumo"),
|
(r"\bSWITCH\s*BLADES?\b", "Nagumo"),
|
||||||
(r"\bSWITH\s*BLADES?\b", "Nagumo"),
|
(r"\bSWITH\s*BLADES?\b", "Nagumo"),
|
||||||
|
(r"\bSWICTH\s*BLADES?\b", "Nagumo"),
|
||||||
(r"\bNAGOMO\b", "Nagumo"),
|
(r"\bNAGOMO\b", "Nagumo"),
|
||||||
|
(r"\bNAGOMU\b", "Nagumo"),
|
||||||
(r"\bNAGUMO\b", "Nagumo"),
|
(r"\bNAGUMO\b", "Nagumo"),
|
||||||
(r"\bDARK\s*(?:MAGES?|MAE)\b", "Dark Mage"),
|
(r"\bDARK\s*(?:MAGES?|MAE)\b", "Dark Mage"),
|
||||||
(r"\bELF\s+MAGE\b", "Elf Mage"),
|
(r"\bELF\s+MAGE\b", "Elf Mage"),
|
||||||
|
(r"\bELF\s+MAGES\b", "Elf Mage"),
|
||||||
(r"\bSLIVER\s+KING\b", "Silver King"),
|
(r"\bSLIVER\s+KING\b", "Silver King"),
|
||||||
(r"\bERZA\s+LIGHTING\b", "Erza Lightning"),
|
(r"\bERZA\s+LIGHTING\b", "Erza Lightning"),
|
||||||
(r"\bMIST\s+NINJA\b", "Mist Ninja"),
|
(r"\bMIST\s+NINJA\b", "Mist Ninja"),
|
||||||
(r"\b(?:HOMURU|HOMURA|HOMURUS)\b", "Homura"),
|
(r"\b(?:HOMURU|HOMURA|HOMURUS)\b", "Homura"),
|
||||||
(r"\b(?:VIOLETINE|VIOLENTINE)\b", "Violentine"),
|
(r"\b(?:VIOLETINE|VIOLENTINE|VIOLENTIN|VIOLTINE|VIOLANTINE|VIOLENTE)\b", "Violentine"),
|
||||||
(r"\b(?:SOMBRE|SOMBER)\b", "Somber"),
|
(r"\b(?:SOMBRE|SOMBER)\b", "Somber"),
|
||||||
(r"\b(?:POSIDON|POSIEDON|POSSEIDON|POSEIDON)\b", "Poseidon"),
|
(r"\b(?:POSIDON|POSIEDON|POSSEIDON|POSEIDON|POSIDEN|POSAIDON|POSIDEON|POSEDION)\b", "Poseidon"),
|
||||||
(r"\b(?:CHUNI|CHUNNI|CHUNII|CHUUNI|CHUUNIS)\b", "Chuuni"),
|
(r"\b(?:CHUNI|CHUNNI|CHUNII|CHUUNI|CHUUNII|CHUUNIS|CHUNNIS|SHUUNI)\b", "Chuuni"),
|
||||||
(r"\bBUDDHAS\b", "Buddha"),
|
(r"\bBUDDHAS\b", "Buddha"),
|
||||||
(r"\bNAGUMOS\b", "Nagumo"),
|
(r"\bNAGUMOS\b", "Nagumo"),
|
||||||
(r"\bDAKR\s+MAGE\b", "Dark Mage"),
|
(r"\bDAKR\s+MAGE\b", "Dark Mage"),
|
||||||
|
(r"\bDRAK\s+MAGE\b", "Dark Mage"),
|
||||||
(r"\bGLIGAMESH\b", "Gilgamesh"),
|
(r"\bGLIGAMESH\b", "Gilgamesh"),
|
||||||
(r"\b(?:KILL\s*STREAK|KILLSTEAK|KILSTREAK|KILLSTRIKE)\b", "Killstreak"),
|
(r"\b(?:KILL\s*STREAK|KILLSTEAK|KILSTREAK|KILLSTRIKE)\b", "Killstreak"),
|
||||||
(r"\bMAMMY\b", "Mamy"),
|
(r"\bMAMMY\b", "Mamy"),
|
||||||
(r"\bAIZENS\b", "Aizen"),
|
(r"\bAIZENS\b", "Aizen"),
|
||||||
(r"\bALUCARDS\b", "Alucard"),
|
(r"\bALUCARDS\b", "Alucard"),
|
||||||
(r"\bBUDDA\b", "Buddha"),
|
(r"\bBUDDA\b", "Buddha"),
|
||||||
|
(r"\b(?:BUDDAH|BUDHA|BUDA)\b", "Buddha"),
|
||||||
|
(r"\bRAUKAI\b", "Rukia"),
|
||||||
|
(r"\bANGLE\b", "Angel"),
|
||||||
|
(r"\bANGEL\b", "Angel"),
|
||||||
|
(r"\bMERLYN\b", "Merlin"),
|
||||||
|
(r"\bSAKAMUTO\b", "Sakamoto"),
|
||||||
|
(r"\bDAKY\b", "Daki"),
|
||||||
|
(r"\bDOFAMINGO\b", "Doflamingo"),
|
||||||
|
(r"\bISSAI\b", "Issei"),
|
||||||
|
(r"\bKILLSREAK\b", "Killstreak"),
|
||||||
|
(r"\bAVDO\b", "Avdol"),
|
||||||
|
(r"\bKOBENO\b", "Kobeni"),
|
||||||
|
(r"\bHIDON\b", "Hidan"),
|
||||||
|
(r"\bYAMOMOTO\b", "Yamamoto"),
|
||||||
|
(r"\bWEATHERGIRL\b", "Weather Girl"),
|
||||||
|
(r"\bSCARLED\s+SLAYER\b", "Scarlet Slayer"),
|
||||||
|
(r"\bSHARK\s+FIN\b", "Sharkfin"),
|
||||||
|
(r"\bIN\s+HUMAN\b", "Inhuman"),
|
||||||
|
(r"\bFLAME\s+FEATHER\b", "Flamefeather"),
|
||||||
|
(r"\bVENGEFULSWORDMAN\b", "Vengeful Swordsman"),
|
||||||
|
(r"\bVENGEFULSWORDSMAN\b", "Vengeful Swordsman"),
|
||||||
|
(r"\bVEGENFUL\s+SWORDSMAN\b", "Vengeful Swordsman"),
|
||||||
|
(r"\bVANDERFUL\s+SWORDSMAN\b", "Vengeful Swordsman"),
|
||||||
|
(r"\bVENGEFUL\s+SWORDSTMAN\b", "Vengeful Swordsman"),
|
||||||
|
(r"\bVENGEFUL\s+SWORDSMEN\b", "Vengeful Swordsman"),
|
||||||
|
(r"\bVIOLENTINR\b", "Violentine"),
|
||||||
|
(r"\bSHIZU\b", "Shizo"),
|
||||||
|
(r"\bHIDEN\b", "Hidan"),
|
||||||
|
(r"\bSOMBR\b", "Somber"),
|
||||||
|
(r"\bKAGURABACHI\b", "Kagura Bachi"),
|
||||||
|
(r"\bYOSHINO\b", "Yoshina"),
|
||||||
|
(r"\bMAGIC\s+GIRL\b", "Madoka"),
|
||||||
|
(r"\bINFINITY\s+MAGE\b", "Merlin"),
|
||||||
|
(r"\bVALENTINE\b(?!\s+BUNDLE)", "Violentine"),
|
||||||
|
(r"\bSAKA\b", "Sakamoto"),
|
||||||
|
(r"\bNAVI\b", "Nami"),
|
||||||
|
(r"\bHIME\b", "Himeno"),
|
||||||
|
(r"\bAKU\b", "Gaku"),
|
||||||
|
(r"\bOSARAGI\b", "Somber"),
|
||||||
|
(r"\bGOWTHER\b", "Doll"),
|
||||||
(r"\b(?:GILGA|GILG)\b", "Gilgamesh"),
|
(r"\b(?:GILGA|GILG)\b", "Gilgamesh"),
|
||||||
(r"\bJIRAYA\b", "Jiraiya"),
|
(r"\bJIRAYA\b", "Jiraiya"),
|
||||||
(r"\bHEALTCLIFF\b", "Heathcliff"),
|
(r"\bHEALTCLIFF\b", "Heathcliff"),
|
||||||
@@ -180,7 +229,7 @@ KNOWN_UNIT_NAMES = tuple(sorted(
|
|||||||
"Death Ninja", "Ice Lily", "Illusionist", "Doflamingo", "Doffy",
|
"Death Ninja", "Ice Lily", "Illusionist", "Doflamingo", "Doffy",
|
||||||
"Viking", "Gohan", "Issei", "Mami", "Mamy", "Millie", "Merlin",
|
"Viking", "Gohan", "Issei", "Mami", "Mamy", "Millie", "Merlin",
|
||||||
"Yamamoto", "Scarlet Slayer", "Flash Ninja", "Heart Princess",
|
"Yamamoto", "Scarlet Slayer", "Flash Ninja", "Heart Princess",
|
||||||
"Angel Devil", "Esdeath", "Erza", "Lucy", "Zabuza", "Kagura Bachi",
|
"Angel", "Angel Devil", "Esdeath", "Erza", "Lucy", "Zabuza", "Kagura Bachi",
|
||||||
"Saki", "Gaku", "Rukia", "Hinami", "Julias", "Umbra", "Rohan",
|
"Saki", "Gaku", "Rukia", "Hinami", "Julias", "Umbra", "Rohan",
|
||||||
"Daki", "Caesar", "Lelouch", "Flamingo", "Veko", "Ichigo",
|
"Daki", "Caesar", "Lelouch", "Flamingo", "Veko", "Ichigo",
|
||||||
"Mangaka", "Oshy", "Akeno", "Akena", "Bomb Angel", "Kisame",
|
"Mangaka", "Oshy", "Akeno", "Akena", "Bomb Angel", "Kisame",
|
||||||
@@ -207,7 +256,8 @@ ALIASED_UNITS = ("Cid", "Mist Ninja", "Inhuman", "Aizen", "Elf Mage",
|
|||||||
"Boros", "Poseidon", "Buddha", "Gilgamesh", "Alucard",
|
"Boros", "Poseidon", "Buddha", "Gilgamesh", "Alucard",
|
||||||
"Thorfinn", "Homura", "Sakamoto", "Shizo", "Doflamingo",
|
"Thorfinn", "Homura", "Sakamoto", "Shizo", "Doflamingo",
|
||||||
"Nagumo", "Rias", "Mamy", "Dark Mage", "Vengeful Swordsman",
|
"Nagumo", "Rias", "Mamy", "Dark Mage", "Vengeful Swordsman",
|
||||||
"Harribel", "Violentine", "Dog Demon", "Heathcliff")
|
"Harribel", "Violentine", "Dog Demon", "Heathcliff",
|
||||||
|
"Skull Knight")
|
||||||
_ALIAS_NAMES = "|".join(re.escape(name).replace(r"\ ", r"\s+")
|
_ALIAS_NAMES = "|".join(re.escape(name).replace(r"\ ", r"\s+")
|
||||||
for name in sorted(ALIASED_UNITS, key=len, reverse=True))
|
for name in sorted(ALIASED_UNITS, key=len, reverse=True))
|
||||||
ALIAS_PAIR = re.compile(
|
ALIAS_PAIR = re.compile(
|
||||||
@@ -765,6 +815,11 @@ def normalize_fodder_units(value: str) -> str:
|
|||||||
|
|
||||||
|
|
||||||
def normalize_unit_names(value: str) -> str:
|
def normalize_unit_names(value: str) -> str:
|
||||||
|
value = re.sub(r"\bInfinity\s+Mage\s*/\s*Merlin\s+(Evo|Unevo)\b",
|
||||||
|
lambda m: "Merlin " + m.group(1).capitalize(), value, flags=re.I)
|
||||||
|
value = re.sub(r"\bShiny(?=Heathcliff\b)", "Shiny ", value, flags=re.I)
|
||||||
|
value = re.sub(r"\b(\d+)x(?=Chuuni\b|Nagumo\b|DM\b)", r"\1x ", value, flags=re.I)
|
||||||
|
value = re.sub(r"\b(\d+)(?=Nagumo\b|DM\b)", r"\1x ", value, flags=re.I)
|
||||||
def collapse_shiny_named_alias(match: re.Match[str]) -> str:
|
def collapse_shiny_named_alias(match: re.Match[str]) -> str:
|
||||||
if match.group("first").casefold() == match.group("second").casefold():
|
if match.group("first").casefold() == match.group("second").casefold():
|
||||||
return match.group()
|
return match.group()
|
||||||
@@ -808,6 +863,30 @@ def normalize_unit_names(value: str) -> str:
|
|||||||
value = MAMY_ALIAS_CHAIN.sub(collapse_mamy_aliases, value)
|
value = MAMY_ALIAS_CHAIN.sub(collapse_mamy_aliases, value)
|
||||||
for pattern, canonical in UNIT_NAME_RULES:
|
for pattern, canonical in UNIT_NAME_RULES:
|
||||||
value = pattern.sub(canonical, value)
|
value = pattern.sub(canonical, value)
|
||||||
|
value = re.sub(r"\b(?:1\s+)?Evo\s+Shiny\s+Somber\s*\(\s*Somber Evo\s*\)",
|
||||||
|
"1x Shiny Somber Evo", value, flags=re.I)
|
||||||
|
value = re.sub(r"\bEvo\s+Shiny\s+Doll\s*\(\s*Doll Evo\s*\)",
|
||||||
|
"Shiny Doll Evo", value, flags=re.I)
|
||||||
|
value = re.sub(r"\bShiny\s+Doll\s*\(\s*Doll Evo\s*\)",
|
||||||
|
"Shiny Doll Evo", value, flags=re.I)
|
||||||
|
value = re.sub(r"\bShiny\s+(Somber|Doll)\s*(?:Evo\s*)?/\s*\1\s+Evo\b",
|
||||||
|
lambda m: "Shiny " + m.group(1).title() + " Evo", value, flags=re.I)
|
||||||
|
value = re.sub(r"\bShiny\s+Skull\s+Knight\s+Evo\s*/\s*Skull\s+Knight(?:\s+Evo)?\b",
|
||||||
|
"Shiny Skull Knight Evo", value, flags=re.I)
|
||||||
|
value = re.sub(r"\bDeer\s+Tan\s+Evo\s+Shiny\s+AND\s+NON\b",
|
||||||
|
"Shiny Deer Tan Evo | Deer Tan Evo", value, flags=re.I)
|
||||||
|
value = re.sub(r"\bCid\s+Evo\s+Shiny\s+Unevo\b",
|
||||||
|
"Shiny Cid Evo", value, flags=re.I)
|
||||||
|
value = re.sub(r"\bJin\s+Mori\s*\(\s*Shiny\s*\)",
|
||||||
|
"Shiny Jin Mori", value, flags=re.I)
|
||||||
|
value = re.sub(r"\bGreen\s+alien\s*\(\s*Shiny\s*\)",
|
||||||
|
"Shiny Green Alien", value, flags=re.I)
|
||||||
|
value = re.sub(r"\bDeer\s+Tan\s+Evo\s*/\s*noko\s+tan\s*\(\s*Shiny\s*\)",
|
||||||
|
"Shiny Deer Tan Evo", value, flags=re.I)
|
||||||
|
value = re.sub(r"\bDark\s+Mage\s+Evo\s+Shiny\b",
|
||||||
|
"Shiny Dark Mage Evo", value, flags=re.I)
|
||||||
|
value = re.sub(r"\bUnevo\s+Shiny\s+Vanilla\s+Ice\s*\(\s*Cream Evo\s*\)",
|
||||||
|
"Shiny Cream Unevo", value, flags=re.I)
|
||||||
def drop_admin_alias(match: re.Match[str]) -> str:
|
def drop_admin_alias(match: re.Match[str]) -> str:
|
||||||
status = (match.group("status") or "").strip().capitalize()
|
status = (match.group("status") or "").strip().capitalize()
|
||||||
if status == "Unevo" or re.search(r"\bUnevo\s+$", value[:match.start()], re.I):
|
if status == "Unevo" or re.search(r"\bUnevo\s+$", value[:match.start()], re.I):
|
||||||
@@ -1218,6 +1297,15 @@ def normalize_shiny_evo_order(value: str) -> str:
|
|||||||
rf"(?P<unit>{unit})\s+Evo\s+Shiny(?=\s*(?:\||$|[,;/)]))",
|
rf"(?P<unit>{unit})\s+Evo\s+Shiny(?=\s*(?:\||$|[,;/)]))",
|
||||||
lambda m: "Shiny " + m.group("unit") + " Evo", value, flags=re.I,
|
lambda m: "Shiny " + m.group("unit") + " Evo", value, flags=re.I,
|
||||||
)
|
)
|
||||||
|
value = re.sub(
|
||||||
|
r"\b(?P<unit>Silver Slayer|Toad Sensei|Doll|Violentine)\s+Evo\s+Shiny\b"
|
||||||
|
r"(?!\s+(?:pass|hunter)\b)",
|
||||||
|
lambda m: "Shiny " + m.group("unit").title() + " Evo", value, flags=re.I,
|
||||||
|
)
|
||||||
|
value = re.sub(r"\bUnevo\s+Shiny\s+Cream\b",
|
||||||
|
"Shiny Cream Unevo", value, flags=re.I)
|
||||||
|
value = re.sub(r"\bEvo\s+Shiny\s+Chuuni\b",
|
||||||
|
"Shiny Chuuni Evo", value, flags=re.I)
|
||||||
parts = value.split("|")
|
parts = value.split("|")
|
||||||
for i, part in enumerate(parts):
|
for i, part in enumerate(parts):
|
||||||
part = re.sub(
|
part = re.sub(
|
||||||
@@ -1273,14 +1361,100 @@ def normalize_evo_status(value: str) -> str:
|
|||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
def normalize_variant_quantities(value: str) -> str:
|
||||||
|
"""Expand explicit inventory totals without losing their shiny or Evo status."""
|
||||||
|
unit = UNIT_MENTION.pattern
|
||||||
|
value = re.sub(r"\b3\s+Fodder\s+Units\s*\(\s*2\s+Unevo\s*,\s*1\s+Evo\s*\)",
|
||||||
|
"2x Fodder Units Unevo | 1x Fodder Units Evo", value, flags=re.I)
|
||||||
|
|
||||||
|
def shiny_remainder(match: re.Match[str]) -> str:
|
||||||
|
total, shiny = int(match.group("total")), int(match.group("shiny_count"))
|
||||||
|
if shiny > total:
|
||||||
|
return match.group()
|
||||||
|
name, status = match.group("unit").title(), match.group("status").capitalize()
|
||||||
|
output = [f"{shiny}x Shiny {name} {status}"]
|
||||||
|
if total > shiny:
|
||||||
|
output.append(f"{total - shiny}x {name} {status}")
|
||||||
|
return " | ".join(output)
|
||||||
|
|
||||||
|
value = re.sub(
|
||||||
|
rf"(?<!\w)(?P<total>\d+)\s*[xX]?\s+(?P<unit>{unit})\s+"
|
||||||
|
rf"(?P<status>Evo|Unevo)\s*\(\s*(?P<shiny_count>\d+)\s*[xX]?\s+Shiny\s*\)",
|
||||||
|
shiny_remainder, value, flags=re.I,
|
||||||
|
)
|
||||||
|
value = re.sub(
|
||||||
|
rf"(?<!\w)(?P<unit>{unit})\s+(?P<status>Evo|Unevo)\s*\(\s*Shiny\s*\)",
|
||||||
|
lambda m: f'Shiny {m.group("unit").title()} {m.group("status").capitalize()}',
|
||||||
|
value, flags=re.I,
|
||||||
|
)
|
||||||
|
|
||||||
|
def counted_variants(match: re.Match[str]) -> str:
|
||||||
|
total = int(match.group("total"))
|
||||||
|
first_count = int(match.group("first_count"))
|
||||||
|
second_count = (int(match.group("second_count"))
|
||||||
|
if match.group("second_count") else total - first_count)
|
||||||
|
if (first_count > total or second_count < 0 or
|
||||||
|
first_count + second_count != total):
|
||||||
|
return match.group()
|
||||||
|
first_status = match.group("first_status").capitalize()
|
||||||
|
second_status = ((match.group("second_status") or
|
||||||
|
("Unevo" if first_status == "Evo" else "Evo")).capitalize())
|
||||||
|
if first_status == second_status:
|
||||||
|
return match.group()
|
||||||
|
name = ("Shiny " if match.group("shiny") else "") + match.group("unit").title()
|
||||||
|
variants = []
|
||||||
|
for count, status in ((first_count, first_status), (second_count, second_status)):
|
||||||
|
if count:
|
||||||
|
variants.append(f"{count}x {name} {status}")
|
||||||
|
return " | ".join(variants)
|
||||||
|
|
||||||
|
value = re.sub(
|
||||||
|
rf"(?<!\w)(?P<total>\d+)\s*[xX]?\s+(?P<shiny>Shiny\s+)?"
|
||||||
|
rf"(?P<unit>{unit})\s*\(\s*(?P<first_count>\d+)\s+"
|
||||||
|
rf"(?P<first_status>Evo|Unevo)\s*,?\s*"
|
||||||
|
rf"(?:(?P<second_count>\d+)\s+(?P<second_status>Evo|Unevo))?\s*\)",
|
||||||
|
counted_variants, value, flags=re.I,
|
||||||
|
)
|
||||||
|
value = re.sub(
|
||||||
|
rf"(?<!\w)(?P<first_count>\d+)\s+(?P<unit>{unit})\s+"
|
||||||
|
rf"(?P<first_status>Evo|Unevo)\s+(?P<second_count>\d+)\s+"
|
||||||
|
rf"(?P<second_status>Evo|Unevo)\b",
|
||||||
|
lambda m: (f'{m.group("first_count")}x {m.group("unit").title()} '
|
||||||
|
f'{m.group("first_status").capitalize()} | '
|
||||||
|
f'{m.group("second_count")}x {m.group("unit").title()} '
|
||||||
|
f'{m.group("second_status").capitalize()}'),
|
||||||
|
value, flags=re.I,
|
||||||
|
)
|
||||||
|
value = re.sub(
|
||||||
|
rf"(?<!\w)(?P<unit>{unit})\s+(?P<first_count>\d+)\s+"
|
||||||
|
rf"(?P<first_status>Evo|Unevo)\s*[/,]\s*"
|
||||||
|
rf"(?P<second_count>\d+)\s+(?P<second_status>Evo|Unevo)\b",
|
||||||
|
lambda m: (f'{m.group("first_count")}x {m.group("unit").title()} '
|
||||||
|
f'{m.group("first_status").capitalize()} | '
|
||||||
|
f'{m.group("second_count")}x {m.group("unit").title()} '
|
||||||
|
f'{m.group("second_status").capitalize()}'),
|
||||||
|
value, flags=re.I,
|
||||||
|
)
|
||||||
|
value = re.sub(r"\b(\d+)\s*Evo\s+Nagumo\s+Evo\b", r"\1x Nagumo Evo", value, flags=re.I)
|
||||||
|
value = re.sub(r"\b(\d+)\s+Evo\s+Chuuni\b", r"\1x Chuuni Evo", value, flags=re.I)
|
||||||
|
value = re.sub(r"\bNagumo\s+(\d+)\s+Evo\b", r"\1x Nagumo Evo", value, flags=re.I)
|
||||||
|
value = re.sub(r"\b2\s+Skull\s+Knight\s+1\s+Unevo\b",
|
||||||
|
"1x Skull Knight Evo | 1x Skull Knight Unevo", value, flags=re.I)
|
||||||
|
value = re.sub(r"\b3\s+Nagumo\s+2\s+Unevo\s+1\s+Evo\b",
|
||||||
|
"2x Nagumo Unevo | 1x Nagumo Evo", value, flags=re.I)
|
||||||
|
value = re.sub(r"\bBuddha\s*\(\s*Buddha Evo\s*\)\s*Evo\b",
|
||||||
|
"Buddha Evo", value, flags=re.I)
|
||||||
|
return value
|
||||||
|
|
||||||
|
|
||||||
def normalize_body_line(raw: str) -> str:
|
def normalize_body_line(raw: str) -> str:
|
||||||
value = tidy_line(raw)
|
value = tidy_line(raw)
|
||||||
value = remove_unicode_emoji(value)
|
value = remove_unicode_emoji(value)
|
||||||
# In copied reposts, the next Trading label can touch the word "units".
|
# In copied reposts, the next Trading label can touch the word "units".
|
||||||
value = re.sub(r"\bunitstrade\b", "units | Trading:", value, flags=re.I)
|
value = re.sub(r"\bunitstrade\b", "units | Trading:", value, flags=re.I)
|
||||||
value = normalize_shiny_evo_order(normalize_unit_names(
|
value = normalize_shiny_evo_order(normalize_variant_quantities(normalize_unit_names(
|
||||||
remove_non_trade_notices(remove_decorative_marks(remove_emoji_codes(value)))
|
remove_non_trade_notices(remove_decorative_marks(remove_emoji_codes(value)))
|
||||||
))
|
)))
|
||||||
value = value.replace("!", "")
|
value = value.replace("!", "")
|
||||||
value = normalize_shiny_evo_order(normalize_evo_status(normalize_shiny_evo_order(value)))
|
value = normalize_shiny_evo_order(normalize_evo_status(normalize_shiny_evo_order(value)))
|
||||||
value = re.sub(r"^\s*[-•]+\s+", "", value)
|
value = re.sub(r"^\s*[-•]+\s+", "", value)
|
||||||
@@ -1961,7 +2135,7 @@ def clean_export_text(value: str) -> str:
|
|||||||
# Remove an Excel escape added by an earlier export before an arrow.
|
# Remove an Excel escape added by an earlier export before an arrow.
|
||||||
value = re.sub(r"^'(?=-+>+|-[A-Za-z])", "", value)
|
value = re.sub(r"^'(?=-+>+|-[A-Za-z])", "", value)
|
||||||
cleaned = OFFER_HEADING.sub("", remove_non_trade_notices(remove_decorative_marks(remove_emoji_codes(value))))
|
cleaned = OFFER_HEADING.sub("", remove_non_trade_notices(remove_decorative_marks(remove_emoji_codes(value))))
|
||||||
cleaned = normalize_shiny_evo_order(normalize_unit_names(cleaned))
|
cleaned = normalize_shiny_evo_order(normalize_variant_quantities(normalize_unit_names(cleaned)))
|
||||||
cleaned = collapse_alias_pairs(strip_category_headings(cleaned))
|
cleaned = collapse_alias_pairs(strip_category_headings(cleaned))
|
||||||
cleaned = normalize_shiny_evo_order(normalize_evo_status(cleaned.replace("!", "")))
|
cleaned = normalize_shiny_evo_order(normalize_evo_status(cleaned.replace("!", "")))
|
||||||
if cleaned != original or re.search(r"^\s*\||\|\s*$|\|\s*\|", cleaned):
|
if cleaned != original or re.search(r"^\s*\||\|\s*$|\|\s*\|", cleaned):
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
228,explicit_for,Shiny Chuuni Evo,1,Aizen Evo,1,1.0,Shiny Chuuni Evo for Aizen Evo
|
228,explicit_for,Shiny Chuuni Evo,1,Aizen Evo,1,1.0,Shiny Chuuni Evo for Aizen Evo
|
||||||
377,explicit_for,Shiny Siren Unevo,1,Shiny Elf Mage Unevo,1,1.0,My Shiny Siren Unevo for Shiny Elf Mage Unevo
|
377,explicit_for,Shiny Siren Unevo,1,Shiny Elf Mage Unevo,1,1.0,My Shiny Siren Unevo for Shiny Elf Mage Unevo
|
||||||
379,listing_pair,Shiny Dark Mage Evo,1,Dark Mage Evo,5,5.0,Shiny Dark Mage Evo -> 5 Dark Mage Evo
|
379,listing_pair,Shiny Dark Mage Evo,1,Dark Mage Evo,5,5.0,Shiny Dark Mage Evo -> 5 Dark Mage Evo
|
||||||
|
468,listing_pair,Buddha Evo,1,Chuuni Evo,1,1.0,Buddha Evo -> Chuuni Evo
|
||||||
490,listing_pair,Shiny Killstreak Evo,1,Dark Mage Evo,1,1.0,Shiny Killstreak Evo -> Dark Mage Evo
|
490,listing_pair,Shiny Killstreak Evo,1,Dark Mage Evo,1,1.0,Shiny Killstreak Evo -> Dark Mage Evo
|
||||||
588,explicit_for,Shiny Cream Evo,1,Shiny Deer Tan Evo,1,1.0,Shiny Cream Evo for Shiny Deer Tan Evo
|
588,explicit_for,Shiny Cream Evo,1,Shiny Deer Tan Evo,1,1.0,Shiny Cream Evo for Shiny Deer Tan Evo
|
||||||
715,explicit_for,Shiny Siren Unevo,1,Shiny Elf Mage Unevo,1,1.0,My Shiny Siren Unevo for Shiny Elf Mage Unevo
|
715,explicit_for,Shiny Siren Unevo,1,Shiny Elf Mage Unevo,1,1.0,My Shiny Siren Unevo for Shiny Elf Mage Unevo
|
||||||
|
|||||||
|
+30
-29
@@ -1,30 +1,31 @@
|
|||||||
unit_variant,interest_index,requested_by,offered_by,total_mentions
|
unit_variant,interest_index,requested_by,offered_by,total_mentions
|
||||||
Thorfinn Evo,1836,35,6,41
|
Thorfinn Evo,1910,35,6,41
|
||||||
Aizen Evo,343,143,182,325
|
Aizen Evo,357,143,182,325
|
||||||
Homura Evo,249,150,264,414
|
Homura Evo,259,150,264,414
|
||||||
Shiny Aizen Evo,236,10,21,31
|
Shiny Aizen Evo,245,10,21,31
|
||||||
Mamy Evo,217,11,25,36
|
Mamy Evo,226,11,25,36
|
||||||
Shiny Homura Evo,205,14,33,47
|
Shiny Homura Evo,214,14,33,47
|
||||||
Shiny Skull Knight Evo,201,9,23,32
|
Shiny Idol Evo,194,6,18,24
|
||||||
Shiny Vengeful Swordsman Evo,191,8,22,30
|
Alucard Evo,191,48,118,166
|
||||||
Shiny Idol Evo,186,6,18,24
|
Shiny Skull Knight Evo,187,9,26,35
|
||||||
Alucard Evo,183,48,118,166
|
Shiny Vengeful Swordsman Evo,184,8,24,32
|
||||||
Shiny Cid Evo,156,11,36,47
|
Shiny Cid Evo,174,12,36,48
|
||||||
Shiny Dark Mage Evo,123,16,64,80
|
Shiny Dark Mage Evo,142,18,64,82
|
||||||
Shiny Mamy Evo,123,12,50,62
|
Shiny Mamy Evo,128,12,50,62
|
||||||
Roger Evo,122,15,61,76
|
Roger Evo,127,15,61,76
|
||||||
Shiny Chuuni Evo,100,20,97,117
|
Shiny Chuuni Evo,107,21,98,119
|
||||||
Shiny Buddha Evo,95,6,38,44
|
Shiny Buddha Evo,93,6,41,47
|
||||||
Somber Evo,83,5,39,44
|
Chuuni Evo,84,33,191,224
|
||||||
Chuuni Evo,82,33,187,220
|
Somber Evo,82,5,41,46
|
||||||
Shiny Poseidon Evo,76,5,43,48
|
Dark Mage Evo,75,55,348,403
|
||||||
Dark Mage Evo,75,57,343,400
|
Shiny Inhuman Evo,74,5,46,51
|
||||||
Shiny Inhuman Evo,71,5,46,51
|
Shiny Poseidon Evo,74,5,46,51
|
||||||
Shiny Gilgamesh Evo,64,6,58,64
|
Shiny Gilgamesh Evo,67,6,58,64
|
||||||
Gilgamesh Evo,62,26,199,225
|
Gilgamesh Evo,65,26,200,226
|
||||||
Buddha Evo,46,19,205,224
|
Skull Knight Evo,59,5,58,63
|
||||||
Vengeful Swordsman Evo,42,10,132,142
|
Buddha Evo,49,21,217,238
|
||||||
Poseidon Evo,40,7,105,112
|
Vengeful Swordsman Evo,42,10,137,147
|
||||||
Shiny Elf Mage Evo,40,5,83,88
|
Shiny Elf Mage Evo,41,5,85,90
|
||||||
Cid Evo,34,14,217,231
|
Poseidon Evo,39,7,114,121
|
||||||
Nagumo Evo,22,9,238,247
|
Cid Evo,33,13,217,230
|
||||||
|
Nagumo Evo,22,9,246,255
|
||||||
|
|||||||
|
@@ -1,19 +1,19 @@
|
|||||||
rank,unit_variant,relative_value,confidence,quote_count,asking_quote_count,completed_trade_count,source_rows,basis,note
|
rank,unit_variant,relative_value,confidence,quote_count,asking_quote_count,completed_trade_count,source_rows,basis,note
|
||||||
1,Shiny Homura Evo,1700,very_low,3,3,0,52 | 174 | 1138,asking_quotes,
|
1,Shiny Homura Evo,1750,very_low,3,3,0,52 | 174 | 1138,asking_quotes,
|
||||||
2,Shiny Aizen Evo,,constraint_only,0,0,0,,user_supplied_ordering,Worth more than Aizen Evo; multiplier unknown
|
2,Shiny Aizen Evo,,constraint_only,0,0,0,,user_supplied_ordering,Worth more than Aizen Evo; multiplier unknown
|
||||||
3,Aizen Evo,1000,low,9,9,0,6 | 47 | 228 | 366 | 397 | 712 | 776 | 800 | 1138,asking_quotes,Aizen Evo = 1000 reference
|
3,Aizen Evo,1000,low,9,9,0,6 | 47 | 228 | 366 | 397 | 712 | 776 | 800 | 1138,asking_quotes,Aizen Evo = 1000 reference
|
||||||
4,Shiny Dark Mage Evo,700,very_low,2,2,0,379 | 776,asking_quotes,
|
4,Shiny Dark Mage Evo,600,low,4,4,0,253 | 379 | 776 | 1195,asking_quotes,
|
||||||
,Alucard Evo,,unstable,5,5,0,6 | 52 | 187 | 397 | 947,asking_quotes,Estimate changes or disconnects when one quote is removed
|
,Alucard Evo,,unstable,5,5,0,6 | 52 | 187 | 397 | 947,asking_quotes,Estimate changes or disconnects when one quote is removed
|
||||||
,Android 21 Evo,,insufficient,1,1,0,52,asking_quotes,Too few independent quotes for a numeric estimate
|
,Android 21 Evo,,insufficient,1,1,0,52,asking_quotes,Too few independent quotes for a numeric estimate
|
||||||
,Buddha Evo,,unstable,3,3,0,115 | 800 | 1195,asking_quotes,Estimate changes or disconnects when one quote is removed
|
,Buddha Evo,,unstable,5,5,0,115 | 253 | 468 | 800 | 1195,asking_quotes,Estimate changes or disconnects when one quote is removed
|
||||||
,Chuuni Evo,,unstable,6,6,0,377 | 536 | 715 | 750 | 1101 | 1195,asking_quotes,Estimate changes or disconnects when one quote is removed
|
,Chuuni Evo,,unstable,7,7,0,377 | 468 | 536 | 715 | 750 | 1101 | 1195,asking_quotes,Estimate changes or disconnects when one quote is removed
|
||||||
,Cid Evo,,insufficient,2,2,0,1256 | 1265,asking_quotes,Too few independent quotes for a numeric estimate
|
,Cid Evo,,insufficient,2,2,0,1256 | 1265,asking_quotes,Too few independent quotes for a numeric estimate
|
||||||
,Cid Unevo,,insufficient,1,1,0,463,asking_quotes,Too few independent quotes for a numeric estimate
|
,Cid Unevo,,insufficient,1,1,0,463,asking_quotes,Too few independent quotes for a numeric estimate
|
||||||
,Cream Evo,,insufficient,1,1,0,1101,asking_quotes,Too few independent quotes for a numeric estimate
|
,Cream Evo,,insufficient,1,1,0,1101,asking_quotes,Too few independent quotes for a numeric estimate
|
||||||
,Dark Mage Evo,,unstable,12,12,0,377 | 379 | 490 | 636 | 715 | 750 | 1078 | 1101 | 1112 | 1241 | 1256 | 1265,asking_quotes,Estimate changes or disconnects when one quote is removed
|
,Dark Mage Evo,,unstable,12,12,0,377 | 379 | 490 | 636 | 715 | 750 | 1078 | 1101 | 1112 | 1241 | 1256 | 1265,asking_quotes,Estimate changes or disconnects when one quote is removed
|
||||||
,Gilgamesh Evo,,insufficient,1,1,0,742,asking_quotes,Too few independent quotes for a numeric estimate
|
,Gilgamesh Evo,,insufficient,1,1,0,742,asking_quotes,Too few independent quotes for a numeric estimate
|
||||||
,Gilgamesh Unevo,,insufficient,1,1,0,115,asking_quotes,Too few independent quotes for a numeric estimate
|
,Gilgamesh Unevo,,insufficient,1,1,0,115,asking_quotes,Too few independent quotes for a numeric estimate
|
||||||
,Homura Evo,,unstable,14,14,0,187 | 366 | 377 | 536 | 712 | 715 | 742 | 800 | 947 | 1078 | 1112 | 1195 | 1241 | 1265,asking_quotes,Estimate changes or disconnects when one quote is removed
|
,Homura Evo,,unstable,15,15,0,187 | 253 | 366 | 377 | 536 | 712 | 715 | 742 | 800 | 947 | 1078 | 1112 | 1195 | 1241 | 1265,asking_quotes,Estimate changes or disconnects when one quote is removed
|
||||||
,Jelly Evo,,insufficient,1,1,0,463,asking_quotes,Too few independent quotes for a numeric estimate
|
,Jelly Evo,,insufficient,1,1,0,463,asking_quotes,Too few independent quotes for a numeric estimate
|
||||||
,Kisuke Evo,,insufficient,1,1,0,1195,asking_quotes,Too few independent quotes for a numeric estimate
|
,Kisuke Evo,,insufficient,1,1,0,1195,asking_quotes,Too few independent quotes for a numeric estimate
|
||||||
,Nagumo Unevo,,insufficient,1,1,0,463,asking_quotes,Too few independent quotes for a numeric estimate
|
,Nagumo Unevo,,insufficient,1,1,0,463,asking_quotes,Too few independent quotes for a numeric estimate
|
||||||
|
|||||||
|
+1115
-1004
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@ import sqlite3
|
|||||||
import unittest
|
import unittest
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
from discord_trade_parser import (Message, clean_offer_items, clean_request_fields,
|
from discord_trade_parser import (Message, clean_export_text, clean_offer_items, clean_request_fields,
|
||||||
export_csv, normalize_request_segments,
|
export_csv, normalize_request_segments,
|
||||||
parse_listing, parse_listings,
|
parse_listing, parse_listings,
|
||||||
repair_glued_reposts,
|
repair_glued_reposts,
|
||||||
@@ -28,6 +28,44 @@ class OpenStringIO(StringIO):
|
|||||||
|
|
||||||
|
|
||||||
class TradeItemCleanupTests(unittest.TestCase):
|
class TradeItemCleanupTests(unittest.TestCase):
|
||||||
|
def test_confirmed_name_aliases_preserve_distinct_variant_status(self):
|
||||||
|
self.assertEqual(clean_export_text("Shiny Raukai Evo | Angle Unevo | Yoshino Evo"),
|
||||||
|
"Shiny Rukia Evo | Angel Unevo | Yoshina Evo")
|
||||||
|
self.assertEqual(clean_export_text("Magic Girl Evo | Infinity Mage Evo | Saka Evo"),
|
||||||
|
"Madoka Evo | Merlin Evo | Sakamoto Evo")
|
||||||
|
self.assertEqual(clean_export_text("Infinity Mage / Merlin Evo"),
|
||||||
|
"Merlin Evo")
|
||||||
|
self.assertEqual(clean_export_text("Valentine Bundle (100RR)"),
|
||||||
|
"Valentine Bundle (100RR)")
|
||||||
|
self.assertEqual(clean_export_text("Shiny Skull Knight Evo / Skeleton Knight"),
|
||||||
|
"Shiny Skull Knight Evo")
|
||||||
|
self.assertEqual(clean_export_text("Shiny Gowther / Doll Evo"),
|
||||||
|
"Shiny Doll Evo")
|
||||||
|
self.assertEqual(clean_export_text("Deer Tan Evo / noko tan (Shiny)"),
|
||||||
|
"Shiny Deer Tan Evo")
|
||||||
|
|
||||||
|
def test_explicit_inventory_splits_preserve_totals_and_shiny_status(self):
|
||||||
|
self.assertEqual(clean_export_text("7x Shiny Siren (2 Evo)"),
|
||||||
|
"2x Shiny Siren Evo | 5x Shiny Siren Unevo")
|
||||||
|
self.assertEqual(clean_export_text("14X Chuuni (11 Unevo 3 Evo) (HAVE 1 Evo ITEM)"),
|
||||||
|
"11x Chuuni Unevo | 3x Chuuni Evo (HAVE 1 Evo ITEM)")
|
||||||
|
self.assertEqual(clean_export_text("4x Poseidon Evo (1x Shiny)"),
|
||||||
|
"1x Shiny Poseidon Evo | 3x Poseidon Evo")
|
||||||
|
self.assertEqual(clean_export_text("2 Chuuni Evo 1 Unevo"),
|
||||||
|
"2x Chuuni Evo | 1x Chuuni Unevo")
|
||||||
|
self.assertEqual(clean_export_text("Toad Sensei Evo Shiny s/s-/sss"),
|
||||||
|
"Shiny Toad Sensei Evo s/s-/sss")
|
||||||
|
self.assertEqual(clean_export_text("3x Unevo Shiny Cream"),
|
||||||
|
"3x Shiny Cream Unevo")
|
||||||
|
self.assertEqual(clean_export_text("Deer Tan Evo Shiny AND NON"),
|
||||||
|
"Shiny Deer Tan Evo | Deer Tan Evo")
|
||||||
|
self.assertEqual(clean_export_text("Cid Evo Shiny Unevo"),
|
||||||
|
"Shiny Cid Evo")
|
||||||
|
self.assertEqual(clean_export_text("Dark Mage Evo Shiny for my Chuuni Evo"),
|
||||||
|
"Shiny Dark Mage Evo for my Chuuni Evo")
|
||||||
|
self.assertEqual(clean_export_text("Unevo Shiny Vanilla Ice (Cream Evo)"),
|
||||||
|
"Shiny Cream Unevo")
|
||||||
|
|
||||||
def test_keeps_stats_broad_options_and_owned_best_offer(self):
|
def test_keeps_stats_broad_options_and_owned_best_offer(self):
|
||||||
offer = ("SSS DMG 23.1% | All Gamepasses | ALL SKINS | "
|
offer = ("SSS DMG 23.1% | All Gamepasses | ALL SKINS | "
|
||||||
"BEST OFFER:Aizen Evo FULL SSS | HIGH OFFER Shiny Homura Evo")
|
"BEST OFFER:Aizen Evo FULL SSS | HIGH OFFER Shiny Homura Evo")
|
||||||
|
|||||||
+197
-197
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user